{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\jschaf01\Box\Nepal\Journalarticle\SecondSubmission\NepalTeacherTrainingPBR_journalarticle\Logs\teachersubjectknowledge.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}23 Feb 2022, 13:05:30
{txt}
{com}. 
. cd "$datasets"  
{res}C:\Users\jschaf01\Box\Nepal\Journalarticle\SecondSubmission\NepalTeacherTrainingPBR_journalarticle\Datasets
{txt}
{com}. ********************************************************************************
.         * Heterogeneous impact estimation
.         ****************************************************************************
.         ****GRADE 9, MATH  - estimating impact that is heterogeneous by standardized avg math teacher assessment score
.         ****************************************************************************
.         
.         use "`e_math_9'", clear
{txt}(Endline student-level Math assessment dataset, Grade 9, Tests A, B & C)

{com}.         count  
  {res}6,801
{txt}
{com}.         unique schoolid /* 203 schools */
{txt}Number of unique values of schoolid is  {res}203
{txt}Number of records is  {res}6801
{txt}
{com}.         
.         
.         egen RawMath9=rowtotal(Math_*)
{txt}
{com}.         
.         *Calculate raw score on below grade items (grade 7 or lower)
.         egen math9_EZ=rowtotal(Math_002 Math_003 Math_005 Math_006 Math_008 ///
>                                                    Math_009 Math_017 Math_018 Math_019 Math_020 Math_021 Math_025 ///
>                                                    Math_026 Math_043 Math_044 Math_045 Math_046 Math_047 ///
>                                                    Math_050 Math_054 Math_055 Math_062 Math_067)
{txt}
{com}.         
.         gen m9pct_EZ=math9_EZ/15 if test=="Math09A"
{txt}(3,600 missing values generated)

{com}.                 replace m9pct_EZ=math9_EZ/14 if test=="Math09B"
{txt}(3,397 real changes made)

{com}.                 replace m9pct_EZ=math9_EZ/16 if test=="Math09C"
{txt}(203 real changes made)

{com}.         
.         drop Math_*
{txt}
{com}.         sort schoolid
{txt}
{com}.         
.         merge m:1 schoolid using "`sch_temp'"
{res}
{txt}{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}               0
{txt}{col 5}matched{col 30}{res}           6,801{txt}  (_merge==3)
{col 5}{hline 41}

{com}.         unique schoolid if avg_mscore~=.  /* still 189 */
{txt}Number of unique values of schoolid is  {res}189
{txt}Number of records is  {res}6426
{txt}
{com}.         
.         
.         //0 unmatched
.         count if stu_serial=="" //0
  {res}0
{txt}
{com}.         drop _m
{txt}
{com}.         sort stu_serial
{txt}
{com}.         
.         *Merge with grade 9 students 
.         merge 1:1 stu_serial using Grade09_c
{res}{txt}{p 0 7 2}
(note: variable
stu_serial was 
str33, now str39 to accommodate using data's values)
{p_end}

{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}           2,739
{txt}{col 9}from master{col 30}{res}               1{txt}  (_merge==1)
{col 9}from using{col 30}{res}           2,738{txt}  (_merge==2)

{col 5}matched{col 30}{res}           6,800{txt}  (_merge==3)
{col 5}{hline 41}

{com}.         //2739 unmatched (1 master, 2738 using)
.         drop _m
{txt}
{com}.         
.         *Merge with grade 9 students math teachers
.         merge 1:1 stu_serial using "`g09mattc'"
{res}
{txt}{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}           3,483
{txt}{col 9}from master{col 30}{res}           3,483{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}matched{col 30}{res}           6,056{txt}  (_merge==3)
{col 5}{hline 41}

{com}.         //3483 unmatched (3483 master)
.         drop if _m==2 
{txt}(0 observations deleted)

{com}.         drop _m
{txt}
{com}.         
.         * Normalize grade 9 math IRT score, 1st for all items then for SSDP-focus items
.         svy, over(treat): mean theta_gr09 
{res}{txt}(running {bf:mean} on estimation sample)
{res}
{txt}Survey: Mean estimation

{col 1}Number of strata{col 18}= {res}     32{txt}{col 41}Number of obs{col 57}= {res}     6,801
{txt}{col 1}Number of PSUs{col 18}= {res}    203{txt}{col 41}Population size{col 57}={res} 39,178.122
{txt}{col 41}Design df{col 57}= {res}       171

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 20}{c |}       Mean{col 32}   Std. Err.{col 44}     [95% Con{col 57}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
c.theta_gr09@treat {c |}
{space 16}0  {c |}{col 20}{res}{space 2} .0614086{col 32}{space 2} .0592022{col 43}{space 5}-.0554527{col 57}{space 3} .1782699
{txt}{space 16}1  {c |}{col 20}{res}{space 2} .0073908{col 32}{space 2} .0678524{col 43}{space 5}-.1265453{col 57}{space 3} .1413269
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}.         mat b = e(b)
{txt}
{com}.         gen mean = b[1,1]
{txt}
{com}.         estat sd

{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{col 1}{text}        Over{col 14}{c |}       Mean{col 27}  Std. Dev.
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{space 10}c. {c |}
{space 2}theta_gr09@{c |}
{space 7}treat {c |}
{space 10}0  {c |}{col 14}{result}{space 2} .0614086{col 27}{space 2} .9425128
{txt}{space 10}1  {c |}{col 14}{result}{space 2} .0073908{col 27}{space 2} .8772881
{col 1}{text}{hline 13}{c BT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{res}{txt}
{com}.         mat sd = r(sd)
{txt}
{com}.         gen sd = sd[1,1]
{txt}
{com}.         gen stdIRTmatgr9=(theta_gr09-mean)/sd
{txt}(2,738 missing values generated)

{com}.         drop mean sd
{txt}
{com}. 
.         svy, over(treat): mean theta_gr09_SSDP 
{res}{txt}(running {bf:mean} on estimation sample)
{res}
{txt}Survey: Mean estimation

{col 1}Number of strata{col 18}= {res}     32{txt}{col 46}Number of obs{col 62}= {res}     6,801
{txt}{col 1}Number of PSUs{col 18}= {res}    203{txt}{col 46}Population size{col 62}={res} 39,178.122
{txt}{col 46}Design df{col 62}= {res}       171

{txt}{hline 24}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 25}{c |}{col 37}  Linearized
{col 25}{c |}       Mean{col 37}   Std. Err.{col 49}     [95% Con{col 62}f. Interval]
{hline 24}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
c.theta_gr09_SSDP@treat {c |}
{space 21}0  {c |}{col 25}{res}{space 2} .0256843{col 37}{space 2} .0499687{col 48}{space 5}-.0729506{col 62}{space 3} .1243191
{txt}{space 21}1  {c |}{col 25}{res}{space 2} .0221719{col 37}{space 2} .0574835{col 48}{space 5}-.0912966{col 62}{space 3} .1356405
{txt}{hline 24}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}.         mat b = e(b)
{txt}
{com}.         gen mean = b[1,1]
{txt}
{com}.         estat sd

{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{col 1}{text}        Over{col 14}{c |}       Mean{col 27}  Std. Dev.
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{space 10}c. {c |}
theta_gr09~P@{c |}
{space 7}treat {c |}
{space 10}0  {c |}{col 14}{result}{space 2} .0256843{col 27}{space 2}  .838501
{txt}{space 10}1  {c |}{col 14}{result}{space 2} .0221719{col 27}{space 2} .7987986
{col 1}{text}{hline 13}{c BT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{res}{txt}
{com}.         mat sd = r(sd)
{txt}
{com}.         gen sd = sd[1,1]
{txt}
{com}.         gen stdIRTmatgr9_SSDP=(theta_gr09_SSDP-mean)/sd
{txt}(2,738 missing values generated)

{com}.         drop mean sd
{txt}
{com}. 
.         svy, over(treat): mean RawMath9 
{res}{txt}(running {bf:mean} on estimation sample)
{res}
{txt}Survey: Mean estimation

{col 1}Number of strata{col 18}= {res}     32{txt}{col 39}Number of obs{col 55}= {res}     6,801
{txt}{col 1}Number of PSUs{col 18}= {res}    203{txt}{col 39}Population size{col 55}={res} 39,178.122
{txt}{col 39}Design df{col 55}= {res}       171

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 18}{c |}{col 30}  Linearized
{col 18}{c |}       Mean{col 30}   Std. Err.{col 42}     [95% Con{col 55}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
c.RawMath9@treat {c |}
{space 14}0  {c |}{col 18}{res}{space 2} 16.78043{col 30}{space 2} .3591581{col 41}{space 5} 16.07148{col 55}{space 3} 17.48939
{txt}{space 14}1  {c |}{col 18}{res}{space 2} 16.41982{col 30}{space 2} .4184547{col 41}{space 5} 15.59382{col 55}{space 3} 17.24582
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}.         mat b = e(b)
{txt}
{com}.         gen mean = b[1,1]
{txt}
{com}.         estat sd

{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{col 1}{text}        Over{col 14}{c |}       Mean{col 27}  Std. Dev.
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{space 2}c.RawMath9@{c |}
{space 7}treat {c |}
{space 10}0  {c |}{col 14}{result}{space 2} 16.78043{col 27}{space 2} 5.734874
{txt}{space 10}1  {c |}{col 14}{result}{space 2} 16.41982{col 27}{space 2} 5.354029
{col 1}{text}{hline 13}{c BT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{res}{txt}
{com}.         mat sd = r(sd)
{txt}
{com}.         gen sd = sd[1,1]
{txt}
{com}.         gen stdRawMath9=(mean-RawMath9)/sd
{txt}(2,738 missing values generated)

{com}.         drop mean sd
{txt}
{com}. 
.         * Add control variables, only for latent skill values that include all items
.         * For wealth I generate IRT, dropping phone (see balance test file for reason)
.         gen dadseced=(f_educlevel>=2 & f_educlevel<=5)
{txt}
{com}.         gen momseced=(m_educlevel>=2 & m_educlevel<=5)
{txt}
{com}.         foreach var in fam_tv fam_bicycle fam_scooter fam_refrigerator fam_computer {c -(}
{txt}  2{com}.           replace `var'=. if `var'==9
{txt}  3{com}.           replace `var'=0 if `var'==2 /* change "no" from 2 to 0, 1 is "yes" */
{txt}  4{com}.           {c )-}
{txt}(125 real changes made, 125 to missing)
(2,575 real changes made)
(140 real changes made, 140 to missing)
(3,842 real changes made)
(278 real changes made, 278 to missing)
(5,181 real changes made)
(269 real changes made, 269 to missing)
(5,424 real changes made)
(316 real changes made, 316 to missing)
(5,701 real changes made)

{com}.         irt 2pl fam_tv fam_bicycle fam_scooter fam_refrigerator fam_computer
{res}{txt}
Fitting fixed-effects model:

Iteration 0:{space 3}log likelihood = {res:-17690.298}  
Iteration 1:{space 3}log likelihood = {res:-17670.022}  
Iteration 2:{space 3}log likelihood = {res:-17670.002}  
Iteration 3:{space 3}log likelihood = {res:-17670.002}  

Fitting full model:
{res}
{txt}Iteration 0:{space 3}log likelihood = {res: -16574.85}  
Iteration 1:{space 3}log likelihood = {res:-16223.114}  
Iteration 2:{space 3}log likelihood = {res: -16167.18}  
Iteration 3:{space 3}log likelihood = {res:-16166.118}  
Iteration 4:{space 3}log likelihood = {res:-16166.116}  
Iteration 5:{space 3}log likelihood = {res:-16166.116}  
{res}
{txt}Two-parameter logistic model{col 49}Number of obs{col 67}= {res}     6,748
{txt}Log likelihood = {res}-16166.116
{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_tv       {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 1.809415{col 26}{space 2} .0905381{col 37}{space 1}   19.99{col 46}{space 3}0.000{col 54}{space 4} 1.631964{col 67}{space 3} 1.986867
{txt}{space 8}Diff {c |}{col 14}{res}{space 2}-.4036514{col 26}{space 2} .0234061{col 37}{space 1}  -17.25{col 46}{space 3}0.000{col 54}{space 4}-.4495264{col 67}{space 3}-.3577763
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_bicycle  {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 1.348752{col 26}{space 2} .0598798{col 37}{space 1}   22.52{col 46}{space 3}0.000{col 54}{space 4} 1.231389{col 67}{space 3} 1.466114
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} .3003634{col 26}{space 2} .0259118{col 37}{space 1}   11.59{col 46}{space 3}0.000{col 54}{space 4} .2495772{col 67}{space 3} .3511496
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_scooter  {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 2.101249{col 26}{space 2} .1126331{col 37}{space 1}   18.66{col 46}{space 3}0.000{col 54}{space 4} 1.880492{col 67}{space 3} 2.322006
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} 1.031878{col 26}{space 2} .0326215{col 37}{space 1}   31.63{col 46}{space 3}0.000{col 54}{space 4} .9679412{col 67}{space 3} 1.095815
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_refrig~r {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 2.041589{col 26}{space 2} .1080392{col 37}{space 1}   18.90{col 46}{space 3}0.000{col 54}{space 4} 1.829836{col 67}{space 3} 2.253342
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} 1.224235{col 26}{space 2} .0372552{col 37}{space 1}   32.86{col 46}{space 3}0.000{col 54}{space 4} 1.151217{col 67}{space 3} 1.297254
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_computer {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 1.327451{col 26}{space 2} .0721492{col 37}{space 1}   18.40{col 46}{space 3}0.000{col 54}{space 4} 1.186041{col 67}{space 3} 1.468861
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} 1.877648{col 26}{space 2} .0740524{col 37}{space 1}   25.36{col 46}{space 3}0.000{col 54}{space 4} 1.732508{col 67}{space 3} 2.022788
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict assetindex, latent
{txt}(option {bf:ebmeans} assumed)
{res}{txt}(using 7 quadrature points)

{com}.         *Set 61 observations = . if no data on assets for them
.         replace assetindex=. if fam_tv==. & fam_bicycle==. & fam_scooter==. ///
>                                                         & fam_refrigerator==. & fam_computer==.
{txt}(2,791 real changes made, 2,791 to missing)

{com}.                                                         
.         tempfile analysis_g9m
{txt}
{com}.         save "`analysis_g9m'", replace
{txt}(note: file C:\Users\jschaf01\AppData\Local\Temp\ST_8e50_00000h.tmp not found)
file C:\Users\jschaf01\AppData\Local\Temp\ST_8e50_00000h.tmp saved

{com}.                                                         
.                 
. ** Grade 9 math, full endline sample, impact estimation (including heterogeneity with respect to avg math teacher score)
. 
.                         use "`analysis_g9m'", clear
{txt}(Endline student-level Math assessment dataset, Grade 9, Tests A, B & C)

{com}.                         unique schoolid if avg_mscore~=.  /* still 189 */
{txt}Number of unique values of schoolid is  {res}189
{txt}Number of records is  {res}6426
{txt}
{com}.                         
.                         
.                         * how does the avg math teacher assessment score differ between treatment and control?
.                         svy: reg std_avg_mscore treat Asnt_aft Math_1st district#stratum        /* No significant difference, but I'm using student-level observations here. */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       32{txt}{col 49}Number of obs{col 67}= {res}     6,426
{txt}{col 1}Number of PSUs{col 20}= {res}      189{txt}{col 49}Population size{col 67}={res} 37,036.884
{txt}{col 49}Design df{col 67}= {res}       157
{txt}{col 49}F({res}  34{txt},{res}    124{txt}){col 67}= {res}      1.40
{txt}{col 49}Prob > F{col 67}= {res}    0.0956
{txt}{col 49}R-squared{col 67}= {res}    0.2341

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}    std_avg_mscore{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2} .0017761{col 32}{space 2} .1131889{col 43}{space 1}    0.02{col 52}{space 3}0.988{col 60}{space 4}-.2217933{col 73}{space 3} .2253455
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .0414372{col 32}{space 2} .1247086{col 43}{space 1}    0.33{col 52}{space 3}0.740{col 60}{space 4}-.2048858{col 73}{space 3} .2877602
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} -.009261{col 32}{space 2} .1149861{col 43}{space 1}   -0.08{col 52}{space 3}0.936{col 60}{space 4}-.2363803{col 73}{space 3} .2178582
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .3590417{col 32}{space 2}  .259204{col 43}{space 1}    1.39{col 52}{space 3}0.168{col 60}{space 4}-.1529353{col 73}{space 3} .8710187
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2}-.0517907{col 32}{space 2} .2827961{col 43}{space 1}   -0.18{col 52}{space 3}0.855{col 60}{space 4}-.6103665{col 73}{space 3} .5067851
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .0648125{col 32}{space 2}  .260098{col 43}{space 1}    0.25{col 52}{space 3}0.804{col 60}{space 4}-.4489303{col 73}{space 3} .5785553
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2}-.4772685{col 32}{space 2} .2645211{col 43}{space 1}   -1.80{col 52}{space 3}0.073{col 60}{space 4}-.9997478{col 73}{space 3} .0452107
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2}  .401903{col 32}{space 2} .3894791{col 43}{space 1}    1.03{col 52}{space 3}0.304{col 60}{space 4} -.367392{col 73}{space 3} 1.171198
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} -.204086{col 32}{space 2} .3561488{col 43}{space 1}   -0.57{col 52}{space 3}0.567{col 60}{space 4}-.9075473{col 73}{space 3} .4993752
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2}  .034323{col 32}{space 2}  .306968{col 43}{space 1}    0.11{col 52}{space 3}0.911{col 60}{space 4}-.5719969{col 73}{space 3} .6406429
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2}-1.063757{col 32}{space 2}   .75799{col 43}{space 1}   -1.40{col 52}{space 3}0.162{col 60}{space 4} -2.56093{col 73}{space 3} .4334172
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .0926323{col 32}{space 2} .2762776{col 43}{space 1}    0.34{col 52}{space 3}0.738{col 60}{space 4}-.4530683{col 73}{space 3} .6383328
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .0796956{col 32}{space 2} .3392435{col 43}{space 1}    0.23{col 52}{space 3}0.815{col 60}{space 4}-.5903745{col 73}{space 3} .7497656
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2}-.0053295{col 32}{space 2} .7073739{col 43}{space 1}   -0.01{col 52}{space 3}0.994{col 60}{space 4}-1.402527{col 73}{space 3} 1.391868
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2}-.1495573{col 32}{space 2} .3500145{col 43}{space 1}   -0.43{col 52}{space 3}0.670{col 60}{space 4}-.8409022{col 73}{space 3} .5417876
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .0325042{col 32}{space 2} .4469714{col 43}{space 1}    0.07{col 52}{space 3}0.942{col 60}{space 4}-.8503489{col 73}{space 3} .9153573
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} .4535965{col 32}{space 2} .2125041{col 43}{space 1}    2.13{col 52}{space 3}0.034{col 60}{space 4} .0338607{col 73}{space 3} .8733324
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2}  .196598{col 32}{space 2} .2083821{col 43}{space 1}    0.94{col 52}{space 3}0.347{col 60}{space 4} -.214996{col 73}{space 3}  .608192
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} .4093034{col 32}{space 2} .2355275{col 43}{space 1}    1.74{col 52}{space 3}0.084{col 60}{space 4} -.055908{col 73}{space 3} .8745148
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} -.749332{col 32}{space 2} .5293415{col 43}{space 1}   -1.42{col 52}{space 3}0.159{col 60}{space 4}-1.794882{col 73}{space 3} .2962176
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .2992121{col 32}{space 2}  .220554{col 43}{space 1}    1.36{col 52}{space 3}0.177{col 60}{space 4}-.1364238{col 73}{space 3}  .734848
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .2538852{col 32}{space 2}  .255714{col 43}{space 1}    0.99{col 52}{space 3}0.322{col 60}{space 4}-.2511983{col 73}{space 3} .7589688
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2}-.0035514{col 32}{space 2} .3180268{col 43}{space 1}   -0.01{col 52}{space 3}0.991{col 60}{space 4}-.6317144{col 73}{space 3} .6246117
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2}  .344741{col 32}{space 2} .2319753{col 43}{space 1}    1.49{col 52}{space 3}0.139{col 60}{space 4} -.113454{col 73}{space 3}  .802936
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .2233464{col 32}{space 2} .3215161{col 43}{space 1}    0.69{col 52}{space 3}0.488{col 60}{space 4}-.4117087{col 73}{space 3} .8584015
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .3535563{col 32}{space 2} .2500576{col 43}{space 1}    1.41{col 52}{space 3}0.159{col 60}{space 4}-.1403549{col 73}{space 3} .8474674
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.5605362{col 32}{space 2} .4665522{col 43}{space 1}   -1.20{col 52}{space 3}0.231{col 60}{space 4}-1.482065{col 73}{space 3} .3609927
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .1109435{col 32}{space 2} .4838149{col 43}{space 1}    0.23{col 52}{space 3}0.819{col 60}{space 4}-.8446826{col 73}{space 3} 1.066569
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2} .0800267{col 32}{space 2} .2445507{col 43}{space 1}    0.33{col 52}{space 3}0.744{col 60}{space 4}-.4030072{col 73}{space 3} .5630607
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2}-.2968871{col 32}{space 2} .5399017{col 43}{space 1}   -0.55{col 52}{space 3}0.583{col 60}{space 4}-1.363295{col 73}{space 3} .7695209
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2} .0224329{col 32}{space 2} .4524928{col 43}{space 1}    0.05{col 52}{space 3}0.961{col 60}{space 4} -.871326{col 73}{space 3} .9161918
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2}-.7058527{col 32}{space 2} .8163382{col 43}{space 1}   -0.86{col 52}{space 3}0.389{col 60}{space 4}-2.318275{col 73}{space 3} .9065696
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2}-.6645913{col 32}{space 2} .3777629{col 43}{space 1}   -1.76{col 52}{space 3}0.080{col 60}{space 4}-1.410744{col 73}{space 3} .0815618
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .4355164{col 32}{space 2} .3168206{col 43}{space 1}    1.37{col 52}{space 3}0.171{col 60}{space 4}-.1902643{col 73}{space 3} 1.061297
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2} .0923362{col 32}{space 2} .2070249{col 43}{space 1}    0.45{col 52}{space 3}0.656{col 60}{space 4}-.3165771{col 73}{space 3} .5012496
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         
.                         preserve
{txt}
{com}.                         keep if std_avg_mscore~=.
{txt}(3,113 observations deleted)

{com}.                         unique schoolid  /* 189 */
{txt}Number of unique values of schoolid is  {res}189
{txt}Number of records is  {res}6426
{txt}
{com}.                         sort schoolid
{txt}
{com}.                         by schoolid:keep if _n==1
{txt}(6,237 observations deleted)

{com}.                         count /* 189 */
  {res}189
{txt}
{com}.                         svy: reg std_avg_mscore treat district#stratum  /* no sig diff at school level */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       32{txt}{col 49}Number of obs{col 67}= {res}       189
{txt}{col 1}Number of PSUs{col 20}= {res}      189{txt}{col 49}Population size{col 67}={res} 1,132.7583
{txt}{col 49}Design df{col 67}= {res}       157
{txt}{col 49}F({res}  32{txt},{res}    126{txt}){col 67}= {res}      1.37
{txt}{col 49}Prob > F{col 67}= {res}    0.1151
{txt}{col 49}R-squared{col 67}= {res}    0.2518

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}    std_avg_mscore{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2} .0111567{col 32}{space 2} .1322567{col 43}{space 1}    0.08{col 52}{space 3}0.933{col 60}{space 4}-.2500752{col 73}{space 3} .2723887
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .4840255{col 32}{space 2} .2820028{col 43}{space 1}    1.72{col 52}{space 3}0.088{col 60}{space 4}-.0729834{col 73}{space 3} 1.041034
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .0882929{col 32}{space 2} .2740732{col 43}{space 1}    0.32{col 52}{space 3}0.748{col 60}{space 4}-.4530535{col 73}{space 3} .6296393
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .0703324{col 32}{space 2} .3591825{col 43}{space 1}    0.20{col 52}{space 3}0.845{col 60}{space 4} -.639121{col 73}{space 3} .7797857
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2}-.2273305{col 32}{space 2} .3044985{col 43}{space 1}   -0.75{col 52}{space 3}0.456{col 60}{space 4}-.8287726{col 73}{space 3} .3741116
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .4555581{col 32}{space 2} .4574996{col 43}{space 1}    1.00{col 52}{space 3}0.321{col 60}{space 4}-.4480902{col 73}{space 3} 1.359206
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2}-.0587425{col 32}{space 2} .3943127{col 43}{space 1}   -0.15{col 52}{space 3}0.882{col 60}{space 4}-.8375847{col 73}{space 3} .7200998
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .0387122{col 32}{space 2} .3509735{col 43}{space 1}    0.11{col 52}{space 3}0.912{col 60}{space 4}-.6545269{col 73}{space 3} .7319514
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} -1.02098{col 32}{space 2} .7712312{col 43}{space 1}   -1.32{col 52}{space 3}0.187{col 60}{space 4}-2.544308{col 73}{space 3} .5023475
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .3338258{col 32}{space 2} .2865131{col 43}{space 1}    1.17{col 52}{space 3}0.246{col 60}{space 4}-.2320918{col 73}{space 3} .8997435
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2}  .243262{col 32}{space 2} .3234282{col 43}{space 1}    0.75{col 52}{space 3}0.453{col 60}{space 4}-.3955699{col 73}{space 3} .8820938
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} .2796608{col 32}{space 2} .6273044{col 43}{space 1}    0.45{col 52}{space 3}0.656{col 60}{space 4}-.9593841{col 73}{space 3} 1.518706
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2}-.0701261{col 32}{space 2} .3650782{col 43}{space 1}   -0.19{col 52}{space 3}0.848{col 60}{space 4}-.7912247{col 73}{space 3} .6509724
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .2565102{col 32}{space 2} .4789875{col 43}{space 1}    0.54{col 52}{space 3}0.593{col 60}{space 4}-.6895807{col 73}{space 3} 1.202601
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} .6293255{col 32}{space 2}  .237729{col 43}{space 1}    2.65{col 52}{space 3}0.009{col 60}{space 4} .1597658{col 73}{space 3} 1.098885
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} .2242404{col 32}{space 2} .2855045{col 43}{space 1}    0.79{col 52}{space 3}0.433{col 60}{space 4} -.339685{col 73}{space 3} .7881658
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} .5638675{col 32}{space 2} .2431597{col 43}{space 1}    2.32{col 52}{space 3}0.022{col 60}{space 4}  .083581{col 73}{space 3} 1.044154
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2}-.5548566{col 32}{space 2}  .592579{col 43}{space 1}   -0.94{col 52}{space 3}0.351{col 60}{space 4}-1.725312{col 73}{space 3} .6155991
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .4758825{col 32}{space 2} .2420547{col 43}{space 1}    1.97{col 52}{space 3}0.051{col 60}{space 4}-.0022212{col 73}{space 3} .9539863
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .4026955{col 32}{space 2} .2593213{col 43}{space 1}    1.55{col 52}{space 3}0.122{col 60}{space 4} -.109513{col 73}{space 3}  .914904
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .1770363{col 32}{space 2} .3631133{col 43}{space 1}    0.49{col 52}{space 3}0.627{col 60}{space 4}-.5401812{col 73}{space 3} .8942538
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .5607747{col 32}{space 2} .2778727{col 43}{space 1}    2.02{col 52}{space 3}0.045{col 60}{space 4} .0119236{col 73}{space 3} 1.109626
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .3265173{col 32}{space 2} .3550595{col 43}{space 1}    0.92{col 52}{space 3}0.359{col 60}{space 4}-.3747925{col 73}{space 3} 1.027827
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .5579896{col 32}{space 2} .2761069{col 43}{space 1}    2.02{col 52}{space 3}0.045{col 60}{space 4} .0126262{col 73}{space 3} 1.103353
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.1494032{col 32}{space 2} .4159172{col 43}{space 1}   -0.36{col 52}{space 3}0.720{col 60}{space 4}-.9709182{col 73}{space 3} .6721119
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .1221684{col 32}{space 2} .4251104{col 43}{space 1}    0.29{col 52}{space 3}0.774{col 60}{space 4}-.7175051{col 73}{space 3} .9618418
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2} .3221393{col 32}{space 2} .2571523{col 43}{space 1}    1.25{col 52}{space 3}0.212{col 60}{space 4}-.1857852{col 73}{space 3} .8300639
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2}-.1469818{col 32}{space 2} .5368525{col 43}{space 1}   -0.27{col 52}{space 3}0.785{col 60}{space 4}-1.207367{col 73}{space 3} .9134035
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2} .0737183{col 32}{space 2} .4846862{col 43}{space 1}    0.15{col 52}{space 3}0.879{col 60}{space 4}-.8836287{col 73}{space 3} 1.031065
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2}-.1364265{col 32}{space 2}   .75716{col 43}{space 1}   -0.18{col 52}{space 3}0.857{col 60}{space 4}-1.631961{col 73}{space 3} 1.359108
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2}-.7379745{col 32}{space 2} .4217895{col 43}{space 1}   -1.75{col 52}{space 3}0.082{col 60}{space 4}-1.571089{col 73}{space 3} .0951395
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .5566958{col 32}{space 2} .3719412{col 43}{space 1}    1.50{col 52}{space 3}0.136{col 60}{space 4}-.1779585{col 73}{space 3}  1.29135
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.0688291{col 32}{space 2} .2204492{col 43}{space 1}   -0.31{col 52}{space 3}0.755{col 60}{space 4} -.504258{col 73}{space 3} .3665997
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         restore
{txt}
{com}.                                                 
.                         *  prep interaction
.                         gen treatxmscore=treat*std_avg_mscore   
{txt}(3,113 missing values generated)

{com}.                         
.                         * ITT estimation
.                         
.                         svy: reg stdIRTmatgr9 treat std_avg_mscore treatxmscore Asnt_aft Math_1st district#stratum      /* 6426 obs */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       32{txt}{col 49}Number of obs{col 67}= {res}     6,426
{txt}{col 1}Number of PSUs{col 20}= {res}      189{txt}{col 49}Population size{col 67}={res} 37,036.884
{txt}{col 49}Design df{col 67}= {res}       157
{txt}{col 49}F({res}  36{txt},{res}    122{txt}){col 67}= {res}     10.15
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.2392

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}      stdIRTmatgr9{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2}-.1134504{col 32}{space 2} .0598097{col 43}{space 1}   -1.90{col 52}{space 3}0.060{col 60}{space 4}-.2315858{col 73}{space 3} .0046851
{txt}{space 4}std_avg_mscore {c |}{col 20}{res}{space 2} .1021696{col 32}{space 2} .0676211{col 43}{space 1}    1.51{col 52}{space 3}0.133{col 60}{space 4}-.0313949{col 73}{space 3} .2357342
{txt}{space 6}treatxmscore {c |}{col 20}{res}{space 2}-.1746968{col 32}{space 2} .0896719{col 43}{space 1}   -1.95{col 52}{space 3}0.053{col 60}{space 4}-.3518158{col 73}{space 3} .0024221
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .0057902{col 32}{space 2} .0642538{col 43}{space 1}    0.09{col 52}{space 3}0.928{col 60}{space 4}-.1211232{col 73}{space 3} .1327035
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2}-.1049268{col 32}{space 2} .0604229{col 43}{space 1}   -1.74{col 52}{space 3}0.084{col 60}{space 4}-.2242736{col 73}{space 3} .0144199
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .8755975{col 32}{space 2} .4054958{col 43}{space 1}    2.16{col 52}{space 3}0.032{col 60}{space 4} .0746665{col 73}{space 3} 1.676528
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .2965025{col 32}{space 2}  .198961{col 43}{space 1}    1.49{col 52}{space 3}0.138{col 60}{space 4}-.0964831{col 73}{space 3} .6894881
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .3094302{col 32}{space 2} .1943498{col 43}{space 1}    1.59{col 52}{space 3}0.113{col 60}{space 4}-.0744475{col 73}{space 3} .6933079
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .6509144{col 32}{space 2} .3106656{col 43}{space 1}    2.10{col 52}{space 3}0.038{col 60}{space 4} .0372911{col 73}{space 3} 1.264538
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .5334605{col 32}{space 2}  .312097{col 43}{space 1}    1.71{col 52}{space 3}0.089{col 60}{space 4}-.0829901{col 73}{space 3} 1.149911
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .1212865{col 32}{space 2} .2387934{col 43}{space 1}    0.51{col 52}{space 3}0.612{col 60}{space 4}-.3503757{col 73}{space 3} .5929486
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .2427601{col 32}{space 2}   .18285{col 43}{space 1}    1.33{col 52}{space 3}0.186{col 60}{space 4}-.1184033{col 73}{space 3} .6039234
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .8491805{col 32}{space 2} .2472262{col 43}{space 1}    3.43{col 52}{space 3}0.001{col 60}{space 4} .3608621{col 73}{space 3} 1.337499
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .7397939{col 32}{space 2} .2377776{col 43}{space 1}    3.11{col 52}{space 3}0.002{col 60}{space 4} .2701381{col 73}{space 3}  1.20945
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .9089418{col 32}{space 2} .2074022{col 43}{space 1}    4.38{col 52}{space 3}0.000{col 60}{space 4} .4992832{col 73}{space 3}   1.3186
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.547274{col 32}{space 2} .2824124{col 43}{space 1}    5.48{col 52}{space 3}0.000{col 60}{space 4} .9894565{col 73}{space 3} 2.105092
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .5600684{col 32}{space 2}  .259902{col 43}{space 1}    2.15{col 52}{space 3}0.033{col 60}{space 4} .0467128{col 73}{space 3} 1.073424
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .4904345{col 32}{space 2} .2210762{col 43}{space 1}    2.22{col 52}{space 3}0.028{col 60}{space 4} .0537672{col 73}{space 3} .9271019
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} 1.139887{col 32}{space 2} .2166828{col 43}{space 1}    5.26{col 52}{space 3}0.000{col 60}{space 4} .7118979{col 73}{space 3} 1.567877
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} 1.115109{col 32}{space 2} .1973899{col 43}{space 1}    5.65{col 52}{space 3}0.000{col 60}{space 4} .7252262{col 73}{space 3} 1.504991
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} 1.129734{col 32}{space 2} .2641844{col 43}{space 1}    4.28{col 52}{space 3}0.000{col 60}{space 4} .6079198{col 73}{space 3} 1.651548
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} 1.628296{col 32}{space 2} .2448033{col 43}{space 1}    6.65{col 52}{space 3}0.000{col 60}{space 4} 1.144763{col 73}{space 3} 2.111828
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .8110516{col 32}{space 2} .1956768{col 43}{space 1}    4.14{col 52}{space 3}0.000{col 60}{space 4} .4245529{col 73}{space 3}  1.19755
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} 1.164964{col 32}{space 2} .2463206{col 43}{space 1}    4.73{col 52}{space 3}0.000{col 60}{space 4} .6784338{col 73}{space 3} 1.651493
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .3060442{col 32}{space 2} .2086995{col 43}{space 1}    1.47{col 52}{space 3}0.145{col 60}{space 4}-.1061768{col 73}{space 3} .7182651
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .3001007{col 32}{space 2} .3128847{col 43}{space 1}    0.96{col 52}{space 3}0.339{col 60}{space 4}-.3179058{col 73}{space 3} .9181071
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .7504169{col 32}{space 2}   .23002{col 43}{space 1}    3.26{col 52}{space 3}0.001{col 60}{space 4} .2960838{col 73}{space 3}  1.20475
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .5025642{col 32}{space 2} .2067567{col 43}{space 1}    2.43{col 52}{space 3}0.016{col 60}{space 4} .0941806{col 73}{space 3} .9109478
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2} -.335389{col 32}{space 2} .2193761{col 43}{space 1}   -1.53{col 52}{space 3}0.128{col 60}{space 4}-.7686983{col 73}{space 3} .0979203
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2}-.0495088{col 32}{space 2} .1691348{col 43}{space 1}   -0.29{col 52}{space 3}0.770{col 60}{space 4}-.3835821{col 73}{space 3} .2845645
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.2147685{col 32}{space 2}  .202122{col 43}{space 1}   -1.06{col 52}{space 3}0.290{col 60}{space 4}-.6139976{col 73}{space 3} .1844607
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} .0542345{col 32}{space 2} .1776929{col 43}{space 1}    0.31{col 52}{space 3}0.761{col 60}{space 4}-.2967427{col 73}{space 3} .4052117
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2}-.1477279{col 32}{space 2} .2891158{col 43}{space 1}   -0.51{col 52}{space 3}0.610{col 60}{space 4}-.7187863{col 73}{space 3} .4233305
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2}-.1563666{col 32}{space 2} .2266135{col 43}{space 1}   -0.69{col 52}{space 3}0.491{col 60}{space 4}-.6039711{col 73}{space 3} .2912378
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .2846528{col 32}{space 2} .3653714{col 43}{space 1}    0.78{col 52}{space 3}0.437{col 60}{space 4}-.4370248{col 73}{space 3}  1.00633
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .5267406{col 32}{space 2} .2783395{col 43}{space 1}    1.89{col 52}{space 3}0.060{col 60}{space 4}-.0230327{col 73}{space 3} 1.076514
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.4432301{col 32}{space 2} .1748192{col 43}{space 1}   -2.54{col 52}{space 3}0.012{col 60}{space 4}-.7885311{col 73}{space 3}-.0979291
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         
.                                 
.                         test treat treatxmscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}treat = 0{p_end}
{p 0 7}{space 1}{text:( 2)}{space 1} treatxmscore = 0{p_end}

{txt}       F(  2,   156) ={res}    3.91
{txt}{col 13}Prob > F ={res}    0.0220
{txt}
{com}.                         test treatxmscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}treatxmscore = 0{p_end}

{txt}       F(  1,   157) ={res}    3.80
{txt}{col 13}Prob > F ={res}    0.0532
{txt}
{com}.                         lincom treat + treatxmscore  /* for teachers 1 std dev above average of teacher test score, training has quite a significant negative impact  (probably should adjust standard errors for preliminary estimation of average score) */

{p 0 7}{space 1}{text:( 1)}{space 1} {res}treat + treatxmscore = 0{p_end}

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}stdIRTmatgr9{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}(1) {c |}{col 14}{res}{space 2}-.2881472{col 26}{space 2} .1047188{col 37}{space 1}   -2.75{col 46}{space 3}0.007{col 54}{space 4}-.4949866{col 67}{space 3}-.0813078
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         
.                         * check what un-interacted treatment looks like on this smaller sample
.                         svy:reg stdIRTmatgr9 treat Asnt_aft Math_1st district#stratum if treatxmscore~=.
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       32{txt}{col 49}Number of obs{col 67}= {res}     6,426
{txt}{col 1}Number of PSUs{col 20}= {res}      189{txt}{col 49}Population size{col 67}={res} 37,036.884
{txt}{col 49}Design df{col 67}= {res}       157
{txt}{col 49}F({res}  34{txt},{res}    124{txt}){col 67}= {res}     10.54
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.2350

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}      stdIRTmatgr9{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2}-.1246718{col 32}{space 2} .0593092{col 43}{space 1}   -2.10{col 52}{space 3}0.037{col 60}{space 4}-.2418187{col 73}{space 3}-.0075249
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .0126566{col 32}{space 2} .0644734{col 43}{space 1}    0.20{col 52}{space 3}0.845{col 60}{space 4}-.1146906{col 73}{space 3} .1400039
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2}-.1091316{col 32}{space 2} .0624668{col 43}{space 1}   -1.75{col 52}{space 3}0.083{col 60}{space 4}-.2325153{col 73}{space 3} .0142522
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .8628454{col 32}{space 2} .4250599{col 43}{space 1}    2.03{col 52}{space 3}0.044{col 60}{space 4} .0232716{col 73}{space 3} 1.702419
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .2883587{col 32}{space 2} .1884811{col 43}{space 1}    1.53{col 52}{space 3}0.128{col 60}{space 4}-.0839271{col 73}{space 3} .6606446
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .3295359{col 32}{space 2} .1895617{col 43}{space 1}    1.74{col 52}{space 3}0.084{col 60}{space 4}-.0448843{col 73}{space 3} .7039561
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .6361476{col 32}{space 2} .3082009{col 43}{space 1}    2.06{col 52}{space 3}0.041{col 60}{space 4} .0273925{col 73}{space 3} 1.244903
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2}  .525468{col 32}{space 2} .3134862{col 43}{space 1}    1.68{col 52}{space 3}0.096{col 60}{space 4}-.0937267{col 73}{space 3} 1.144663
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .1423528{col 32}{space 2} .2294509{col 43}{space 1}    0.62{col 52}{space 3}0.536{col 60}{space 4}-.3108561{col 73}{space 3} .5955618
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .2480234{col 32}{space 2} .1752773{col 43}{space 1}    1.42{col 52}{space 3}0.159{col 60}{space 4}-.0981825{col 73}{space 3} .5942293
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .7809532{col 32}{space 2} .2272153{col 43}{space 1}    3.44{col 52}{space 3}0.001{col 60}{space 4} .3321601{col 73}{space 3} 1.229746
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2}  .736522{col 32}{space 2} .2462118{col 43}{space 1}    2.99{col 52}{space 3}0.003{col 60}{space 4} .2502071{col 73}{space 3} 1.222837
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .8829012{col 32}{space 2} .1924683{col 43}{space 1}    4.59{col 52}{space 3}0.000{col 60}{space 4}   .50274{col 73}{space 3} 1.263062
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.607183{col 32}{space 2} .2931304{col 43}{space 1}    5.48{col 52}{space 3}0.000{col 60}{space 4} 1.028195{col 73}{space 3} 2.186171
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .5123918{col 32}{space 2} .2391838{col 43}{space 1}    2.14{col 52}{space 3}0.034{col 60}{space 4} .0399587{col 73}{space 3}  .984825
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .5026722{col 32}{space 2} .2357235{col 43}{space 1}    2.13{col 52}{space 3}0.035{col 60}{space 4} .0370737{col 73}{space 3} .9682707
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} 1.138854{col 32}{space 2} .2100669{col 43}{space 1}    5.42{col 52}{space 3}0.000{col 60}{space 4} .7239321{col 73}{space 3} 1.553776
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} 1.085713{col 32}{space 2} .1821663{col 43}{space 1}    5.96{col 52}{space 3}0.000{col 60}{space 4} .7258997{col 73}{space 3} 1.445526
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} 1.115048{col 32}{space 2} .2459698{col 43}{space 1}    4.53{col 52}{space 3}0.000{col 60}{space 4} .6292109{col 73}{space 3} 1.600885
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} 1.639438{col 32}{space 2} .2294692{col 43}{space 1}    7.14{col 52}{space 3}0.000{col 60}{space 4} 1.186193{col 73}{space 3} 2.092683
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .8196468{col 32}{space 2} .1867259{col 43}{space 1}    4.39{col 52}{space 3}0.000{col 60}{space 4} .4508278{col 73}{space 3} 1.188466
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} 1.151522{col 32}{space 2} .2441277{col 43}{space 1}    4.72{col 52}{space 3}0.000{col 60}{space 4} .6693233{col 73}{space 3}  1.63372
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .3273991{col 32}{space 2} .1981678{col 43}{space 1}    1.65{col 52}{space 3}0.101{col 60}{space 4}-.0640198{col 73}{space 3} .7188181
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .3242384{col 32}{space 2} .3245049{col 43}{space 1}    1.00{col 52}{space 3}0.319{col 60}{space 4}-.3167201{col 73}{space 3}  .965197
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .7240118{col 32}{space 2} .2117744{col 43}{space 1}    3.42{col 52}{space 3}0.001{col 60}{space 4} .3057173{col 73}{space 3} 1.142306
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .4933832{col 32}{space 2} .1983666{col 43}{space 1}    2.49{col 52}{space 3}0.014{col 60}{space 4} .1015716{col 73}{space 3} .8851949
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.3666074{col 32}{space 2} .2198129{col 43}{space 1}   -1.67{col 52}{space 3}0.097{col 60}{space 4}-.8007795{col 73}{space 3} .0675648
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2}-.0436159{col 32}{space 2} .1577255{col 43}{space 1}   -0.28{col 52}{space 3}0.783{col 60}{space 4}-.3551536{col 73}{space 3} .2679217
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.2198023{col 32}{space 2} .1968618{col 43}{space 1}   -1.12{col 52}{space 3}0.266{col 60}{space 4}-.6086417{col 73}{space 3}  .169037
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} .0211723{col 32}{space 2} .1688956{col 43}{space 1}    0.13{col 52}{space 3}0.900{col 60}{space 4}-.3124284{col 73}{space 3} .3547731
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2}  -.14497{col 32}{space 2} .2741559{col 43}{space 1}   -0.53{col 52}{space 3}0.598{col 60}{space 4}-.6864798{col 73}{space 3} .3965398
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2}-.0829009{col 32}{space 2} .2280983{col 43}{space 1}   -0.36{col 52}{space 3}0.717{col 60}{space 4}-.5334381{col 73}{space 3} .3676363
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .2249099{col 32}{space 2} .3522477{col 43}{space 1}    0.64{col 52}{space 3}0.524{col 60}{space 4}-.4708461{col 73}{space 3} .9206658
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .5662273{col 32}{space 2} .2788859{col 43}{space 1}    2.03{col 52}{space 3}0.044{col 60}{space 4} .0153748{col 73}{space 3}  1.11708
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.4307274{col 32}{space 2} .1644825{col 43}{space 1}   -2.62{col 52}{space 3}0.010{col 60}{space 4}-.7556114{col 73}{space 3}-.1058433
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         svy:reg stdIRTmatgr9 treat Asnt_aft Math_1st district#stratum  /// sample change doesn't make a big difference
>                         
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       32{txt}{col 49}Number of obs{col 67}= {res}     6,801
{txt}{col 1}Number of PSUs{col 20}= {res}      203{txt}{col 49}Population size{col 67}={res} 39,178.122
{txt}{col 49}Design df{col 67}= {res}       171
{txt}{col 49}F({res}  34{txt},{res}    138{txt}){col 67}= {res}      9.42
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.2288

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}      stdIRTmatgr9{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2}-.1104687{col 32}{space 2} .0659203{col 43}{space 1}   -1.68{col 52}{space 3}0.096{col 60}{space 4} -.240591{col 73}{space 3} .0196536
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2}  .015377{col 32}{space 2} .0685779{col 43}{space 1}    0.22{col 52}{space 3}0.823{col 60}{space 4}-.1199912{col 73}{space 3} .1507452
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} -.054903{col 32}{space 2} .0634259{col 43}{space 1}   -0.87{col 52}{space 3}0.388{col 60}{space 4}-.1801014{col 73}{space 3} .0702955
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .8082419{col 32}{space 2} .3600521{col 43}{space 1}    2.24{col 52}{space 3}0.026{col 60}{space 4} .0975229{col 73}{space 3} 1.518961
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .3252048{col 32}{space 2} .1788664{col 43}{space 1}    1.82{col 52}{space 3}0.071{col 60}{space 4}-.0278657{col 73}{space 3} .6782753
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .3540456{col 32}{space 2} .1826355{col 43}{space 1}    1.94{col 52}{space 3}0.054{col 60}{space 4}-.0064648{col 73}{space 3}  .714556
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .7478346{col 32}{space 2} .2858169{col 43}{space 1}    2.62{col 52}{space 3}0.010{col 60}{space 4} .1836509{col 73}{space 3} 1.312018
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .5697733{col 32}{space 2} .2931162{col 43}{space 1}    1.94{col 52}{space 3}0.054{col 60}{space 4}-.0088187{col 73}{space 3} 1.148365
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .1474536{col 32}{space 2} .2122308{col 43}{space 1}    0.69{col 52}{space 3}0.488{col 60}{space 4}-.2714761{col 73}{space 3} .5663832
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .2823213{col 32}{space 2} .1692304{col 43}{space 1}    1.67{col 52}{space 3}0.097{col 60}{space 4}-.0517282{col 73}{space 3} .6163709
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .8198836{col 32}{space 2} .2214223{col 43}{space 1}    3.70{col 52}{space 3}0.000{col 60}{space 4} .3828106{col 73}{space 3} 1.256957
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2}  .766664{col 32}{space 2} .2516959{col 43}{space 1}    3.05{col 52}{space 3}0.003{col 60}{space 4} .2698328{col 73}{space 3} 1.263495
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .9190231{col 32}{space 2} .1846399{col 43}{space 1}    4.98{col 52}{space 3}0.000{col 60}{space 4} .5545563{col 73}{space 3}  1.28349
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.629149{col 32}{space 2} .2932356{col 43}{space 1}    5.56{col 52}{space 3}0.000{col 60}{space 4} 1.050322{col 73}{space 3} 2.207977
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2}  .542635{col 32}{space 2} .2316657{col 43}{space 1}    2.34{col 52}{space 3}0.020{col 60}{space 4} .0853423{col 73}{space 3} .9999278
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2}  .531014{col 32}{space 2} .2218531{col 43}{space 1}    2.39{col 52}{space 3}0.018{col 60}{space 4} .0930906{col 73}{space 3} .9689373
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} 1.168225{col 32}{space 2} .2028965{col 43}{space 1}    5.76{col 52}{space 3}0.000{col 60}{space 4} .7677206{col 73}{space 3} 1.568729
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} 1.133159{col 32}{space 2} .1742566{col 43}{space 1}    6.50{col 52}{space 3}0.000{col 60}{space 4} .7891876{col 73}{space 3}  1.47713
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} 1.162298{col 32}{space 2} .2436442{col 43}{space 1}    4.77{col 52}{space 3}0.000{col 60}{space 4} .6813601{col 73}{space 3} 1.643235
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} 1.257983{col 32}{space 2} .3263049{col 43}{space 1}    3.86{col 52}{space 3}0.000{col 60}{space 4} .6138782{col 73}{space 3} 1.902087
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .9328688{col 32}{space 2} .1909596{col 43}{space 1}    4.89{col 52}{space 3}0.000{col 60}{space 4} .5559272{col 73}{space 3}  1.30981
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} 1.184956{col 32}{space 2} .2342482{col 43}{space 1}    5.06{col 52}{space 3}0.000{col 60}{space 4} .7225654{col 73}{space 3} 1.647346
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .3622672{col 32}{space 2} .1832631{col 43}{space 1}    1.98{col 52}{space 3}0.050{col 60}{space 4}  .000518{col 73}{space 3} .7240164
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .5226979{col 32}{space 2} .3039301{col 43}{space 1}    1.72{col 52}{space 3}0.087{col 60}{space 4}-.0772401{col 73}{space 3} 1.122636
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .7675618{col 32}{space 2} .2040984{col 43}{space 1}    3.76{col 52}{space 3}0.000{col 60}{space 4}  .364685{col 73}{space 3} 1.170439
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .5388284{col 32}{space 2} .1852477{col 43}{space 1}    2.91{col 52}{space 3}0.004{col 60}{space 4} .1731616{col 73}{space 3} .9044952
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.3578618{col 32}{space 2} .1890553{col 43}{space 1}   -1.89{col 52}{space 3}0.060{col 60}{space 4}-.7310444{col 73}{space 3} .0153208
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .0056963{col 32}{space 2} .1478254{col 43}{space 1}    0.04{col 52}{space 3}0.969{col 60}{space 4}-.2861013{col 73}{space 3} .2974938
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.1926781{col 32}{space 2} .1887213{col 43}{space 1}   -1.02{col 52}{space 3}0.309{col 60}{space 4}-.5652015{col 73}{space 3} .1798453
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} .0759259{col 32}{space 2} .1559949{col 43}{space 1}    0.49{col 52}{space 3}0.627{col 60}{space 4}-.2319977{col 73}{space 3} .3838496
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2}-.1672303{col 32}{space 2}  .235032{col 43}{space 1}   -0.71{col 52}{space 3}0.478{col 60}{space 4}-.6311678{col 73}{space 3} .2967073
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2}-.0603047{col 32}{space 2} .1910388{col 43}{space 1}   -0.32{col 52}{space 3}0.753{col 60}{space 4}-.4374026{col 73}{space 3} .3167933
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .4444354{col 32}{space 2} .3499542{col 43}{space 1}    1.27{col 52}{space 3}0.206{col 60}{space 4}-.2463511{col 73}{space 3} 1.135222
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .6177296{col 32}{space 2} .2812434{col 43}{space 1}    2.20{col 52}{space 3}0.029{col 60}{space 4} .0625737{col 73}{space 3} 1.172886
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.4995911{col 32}{space 2} .1508641{col 43}{space 1}   -3.31{col 52}{space 3}0.001{col 60}{space 4}-.7973869{col 73}{space 3}-.2017953
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         * Set up for LATE 
.                         
.                         * Generate dummy variable for LATE regressions: teacher actually trained in 2 types of training
.                         gen tchrtreat_m=ssdp_m_t*treat
{txt}(3,491 missing values generated)

{com}.                                                 
.                         summ tchrtreat_m treat std_avg_mscore

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}tchrtreat_m {c |}{res}      6,048    .3183697    .4655716          0          1
{txt}{space 7}treat {c |}{res}      6,801    .4931628      .49999          0          1
{txt}std_avg_ms~e {c |}{res}      6,426    .1305821    .7080227  -4.015192   .7950177
{txt}
{com}.                         count if tchrtreat_m~=. & std_avg_mscore~=.    /* 5800 */
  {res}5,800
{txt}
{com}.                                                                                                 
.                         * LATE regression without interaction  but with the standardized teacher math score as a regressor  
.                         
.                         svy: ivregress 2sls stdIRTmatgr9 Asnt_aft Math_1st std_avg_mscore district#stratum  (tchrtreat_m = treat) /*This fails becauseo of stratum with single sampling unit.*/
{res}{txt}(running {bf:ivregress} on estimation sample)
{res}
{txt}Survey: Instrumental variables (2SLS) regression

{col 1}Number of strata{col 20}= {res}       32{txt}{col 49}Number of obs{col 67}= {res}     5,800
{txt}{col 1}Number of PSUs{col 20}= {res}      175{txt}{col 49}Population size{col 67}={res} 33,358.612
{txt}{col 49}Design df{col 67}= {res}       143
{txt}{col 49}{help j_robustsingular##|_new:F(   0,    143)}{col 67}=          {res}.
{txt}{col 49}Prob > F{col 67}=          {res}.
{txt}{col 49}R-squared{col 67}= {res}    0.2414

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}      stdIRTmatgr9{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}tchrtreat_m {c |}{col 20}{res}{space 2} -.121644{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .0153439{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} -.114968{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 4}std_avg_mscore {c |}{col 20}{res}{space 2} .0394463{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2}   .20889{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .3338236{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .3178788{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .6124509{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .4764966{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .1245331{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .2180812{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .7875007{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .7405596{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .9315047{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.560149{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2}  .546075{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .4800496{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2}  1.13793{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} 1.066431{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} 1.086609{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} 1.612998{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .7856877{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} 1.150755{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .3184177{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .3064891{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .7605307{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2}  .479258{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}  -.34523{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} -.075993{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.2253797{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2}-.1156963{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2}-.1712064{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2}-.1197948{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2}  .217006{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .3450317{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2} -.432675{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 15 31}Instrumented:{space 2}tchrtreat_m{p_end}
{p 0 15 31}Instruments:{space 3}Asnt_aft Math_1st std_avg_mscore 2b.district#2.stratum 5.district#1b.stratum 5.district#2.stratum 11.district#1b.stratum 11.district#2.stratum 20.district#1b.stratum 20.district#2.stratum 24.district#1b.stratum 24.district#2.stratum 28.district#1b.stratum 28.district#2.stratum 34.district#1b.stratum 34.district#2.stratum 35.district#1b.stratum 35.district#2.stratum 37.district#1b.stratum 37.district#2.stratum 45.district#1b.stratum 45.district#2.stratum 50.district#1b.stratum 50.district#2.stratum 51.district#1b.stratum 51.district#2.stratum 55.district#1b.stratum 55.district#2.stratum 60.district#1b.stratum 60.district#2.stratum 63.district#1b.stratum 63.district#2.stratum 69.district#1b.stratum 69.district#2.stratum treat{p_end}
{hline 84}
{p 0 6 0 79}Note: Missing standard errors because of stratum with single sampling unit.{txt}{p_end}

{com}.                         
.                         * finding bad dist_stratum
.                         preserve
{txt}
{com}.                         drop if std_avg_mscore==. | tchrtreat_m==. | stdIRTmatgr9==.
{txt}(3,739 observations deleted)

{com}.                         count
  {res}5,800
{txt}
{com}.                         unique schoolid  /* 175 schools, 5800 students */
{txt}Number of unique values of schoolid is  {res}175
{txt}Number of records is  {res}5800
{txt}
{com}.                                                 
.                         sort schoolid 
{txt}
{com}.                         by schoolid:  gen first=_n==1
{txt}
{com}.                         keep if first==1
{txt}(5,625 observations deleted)

{com}.                         tab dist_stratum  /* looks like dist_stratum=22 is a problem */

{txt}dist_stratu {c |}
          m {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
         21 {c |}{res}          6        3.43        3.43
{txt}         22 {c |}{res}          1        0.57        4.00
{txt}         51 {c |}{res}         14        8.00       12.00
{txt}         52 {c |}{res}          8        4.57       16.57
{txt}        111 {c |}{res}          7        4.00       20.57
{txt}        112 {c |}{res}          3        1.71       22.29
{txt}        201 {c |}{res}          7        4.00       26.29
{txt}        202 {c |}{res}          4        2.29       28.57
{txt}        241 {c |}{res}          8        4.57       33.14
{txt}        242 {c |}{res}          4        2.29       35.43
{txt}        281 {c |}{res}          6        3.43       38.86
{txt}        282 {c |}{res}          4        2.29       41.14
{txt}        341 {c |}{res}          8        4.57       45.71
{txt}        342 {c |}{res}          4        2.29       48.00
{txt}        351 {c |}{res}          8        4.57       52.57
{txt}        352 {c |}{res}          4        2.29       54.86
{txt}        371 {c |}{res}          8        4.57       59.43
{txt}        372 {c |}{res}          2        1.14       60.57
{txt}        451 {c |}{res}          7        4.00       64.57
{txt}        452 {c |}{res}          2        1.14       65.71
{txt}        501 {c |}{res}          7        4.00       69.71
{txt}        502 {c |}{res}          3        1.71       71.43
{txt}        511 {c |}{res}          6        3.43       74.86
{txt}        512 {c |}{res}          3        1.71       76.57
{txt}        551 {c |}{res}          6        3.43       80.00
{txt}        552 {c |}{res}          4        2.29       82.29
{txt}        601 {c |}{res}          8        4.57       86.86
{txt}        602 {c |}{res}          4        2.29       89.14
{txt}        631 {c |}{res}          5        2.86       92.00
{txt}        632 {c |}{res}          3        1.71       93.71
{txt}        691 {c |}{res}          7        4.00       97.71
{txt}        692 {c |}{res}          4        2.29      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        175      100.00
{txt}
{com}.                         restore
{txt}
{com}.                                         
.                         * remove bad dist_stratum
.                         drop if dist_stratum==22
{txt}(211 observations deleted)

{com}.                                 
.                         * LATE with math teacher score as regressor, but no interaction. after dropping dist_stratum==22
.                         svy: ivregress 2sls stdIRTmatgr9 Asnt_aft Math_1st std_avg_mscore district#stratum  (tchrtreat_m = treat)
{res}{txt}(running {bf:ivregress} on estimation sample)
{res}
{txt}Survey: Instrumental variables (2SLS) regression

{col 1}Number of strata{col 20}= {res}       31{txt}{col 49}Number of obs{col 67}= {res}     5,738
{txt}{col 1}Number of PSUs{col 20}= {res}      174{txt}{col 49}Population size{col 67}={res} 33,148.347
{txt}{col 49}Design df{col 67}= {res}       143
{txt}{col 49}F({res}  34{txt},{res}    110{txt}){col 67}= {res}     10.75
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.2422

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}      stdIRTmatgr9{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}tchrtreat_m {c |}{col 20}{res}{space 2} -.121644{col 32}{space 2} .0861946{col 43}{space 1}   -1.41{col 52}{space 3}0.160{col 60}{space 4}-.2920242{col 73}{space 3} .0487363
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .0153439{col 32}{space 2} .0712272{col 43}{space 1}    0.22{col 52}{space 3}0.830{col 60}{space 4}-.1254504{col 73}{space 3} .1561381
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} -.114968{col 32}{space 2} .0630731{col 43}{space 1}   -1.82{col 52}{space 3}0.070{col 60}{space 4}-.2396441{col 73}{space 3} .0097082
{txt}{space 4}std_avg_mscore {c |}{col 20}{res}{space 2} .0394463{col 32}{space 2} .0438837{col 43}{space 1}    0.90{col 52}{space 3}0.370{col 60}{space 4}-.0472983{col 73}{space 3}  .126191
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2}        0{col 32}{txt}  (empty)
{space 9}Morang#1  {c |}{col 20}{res}{space 2} .3338236{col 32}{space 2} .1989734{col 43}{space 1}    1.68{col 52}{space 3}0.096{col 60}{space 4}-.0594855{col 73}{space 3} .7271328
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .3178788{col 32}{space 2}  .203713{col 43}{space 1}    1.56{col 52}{space 3}0.121{col 60}{space 4} -.084799{col 73}{space 3} .7205566
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .6124509{col 32}{space 2} .3272333{col 43}{space 1}    1.87{col 52}{space 3}0.063{col 60}{space 4}-.0343886{col 73}{space 3}  1.25929
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .4764966{col 32}{space 2} .3101073{col 43}{space 1}    1.54{col 52}{space 3}0.127{col 60}{space 4}  -.13649{col 73}{space 3} 1.089483
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .1245331{col 32}{space 2} .2452979{col 43}{space 1}    0.51{col 52}{space 3}0.612{col 60}{space 4}-.3603454{col 73}{space 3} .6094115
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .2180812{col 32}{space 2} .1811673{col 43}{space 1}    1.20{col 52}{space 3}0.231{col 60}{space 4}-.1400308{col 73}{space 3} .5761932
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .7875007{col 32}{space 2} .2444024{col 43}{space 1}    3.22{col 52}{space 3}0.002{col 60}{space 4} .3043924{col 73}{space 3} 1.270609
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .7405596{col 32}{space 2} .2505061{col 43}{space 1}    2.96{col 52}{space 3}0.004{col 60}{space 4} .2453861{col 73}{space 3} 1.235733
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .9315047{col 32}{space 2} .2436191{col 43}{space 1}    3.82{col 52}{space 3}0.000{col 60}{space 4} .4499447{col 73}{space 3} 1.413065
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.560149{col 32}{space 2} .2959872{col 43}{space 1}    5.27{col 52}{space 3}0.000{col 60}{space 4} .9750737{col 73}{space 3} 2.145225
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2}  .546075{col 32}{space 2} .2466921{col 43}{space 1}    2.21{col 52}{space 3}0.028{col 60}{space 4} .0584408{col 73}{space 3} 1.033709
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .4800496{col 32}{space 2} .2361218{col 43}{space 1}    2.03{col 52}{space 3}0.044{col 60}{space 4} .0133096{col 73}{space 3} .9467896
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2}  1.13793{col 32}{space 2} .2204126{col 43}{space 1}    5.16{col 52}{space 3}0.000{col 60}{space 4} .7022423{col 73}{space 3} 1.573618
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} 1.066431{col 32}{space 2} .1772643{col 43}{space 1}    6.02{col 52}{space 3}0.000{col 60}{space 4} .7160339{col 73}{space 3} 1.416828
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} 1.086609{col 32}{space 2} .2606347{col 43}{space 1}    4.17{col 52}{space 3}0.000{col 60}{space 4} .5714139{col 73}{space 3} 1.601803
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} 1.612998{col 32}{space 2} .3450396{col 43}{space 1}    4.67{col 52}{space 3}0.000{col 60}{space 4} .9309611{col 73}{space 3} 2.295035
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .7856877{col 32}{space 2}  .197101{col 43}{space 1}    3.99{col 52}{space 3}0.000{col 60}{space 4} .3960797{col 73}{space 3} 1.175296
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} 1.150755{col 32}{space 2} .3868712{col 43}{space 1}    2.97{col 52}{space 3}0.003{col 60}{space 4}   .38603{col 73}{space 3} 1.915481
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .3184177{col 32}{space 2} .2202263{col 43}{space 1}    1.45{col 52}{space 3}0.150{col 60}{space 4} -.116902{col 73}{space 3} .7537373
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .3064891{col 32}{space 2} .3289161{col 43}{space 1}    0.93{col 52}{space 3}0.353{col 60}{space 4}-.3436768{col 73}{space 3} .9566549
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .7605307{col 32}{space 2} .2413582{col 43}{space 1}    3.15{col 52}{space 3}0.002{col 60}{space 4} .2834397{col 73}{space 3} 1.237622
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2}  .479258{col 32}{space 2} .2575542{col 43}{space 1}    1.86{col 52}{space 3}0.065{col 60}{space 4}-.0298473{col 73}{space 3} .9883632
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}  -.34523{col 32}{space 2}   .23472{col 43}{space 1}   -1.47{col 52}{space 3}0.144{col 60}{space 4}-.8091992{col 73}{space 3} .1187393
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} -.075993{col 32}{space 2} .1857078{col 43}{space 1}   -0.41{col 52}{space 3}0.683{col 60}{space 4}-.4430801{col 73}{space 3} .2910941
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.2253797{col 32}{space 2} .2122861{col 43}{space 1}   -1.06{col 52}{space 3}0.290{col 60}{space 4}-.6450041{col 73}{space 3} .1942446
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2}-.1156963{col 32}{space 2} .2165543{col 43}{space 1}   -0.53{col 52}{space 3}0.594{col 60}{space 4}-.5437575{col 73}{space 3} .3123649
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2}-.1712064{col 32}{space 2} .2807032{col 43}{space 1}   -0.61{col 52}{space 3}0.543{col 60}{space 4}-.7260702{col 73}{space 3} .3836575
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2}-.1197948{col 32}{space 2} .2343157{col 43}{space 1}   -0.51{col 52}{space 3}0.610{col 60}{space 4}-.5829647{col 73}{space 3} .3433752
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2}  .217006{col 32}{space 2} .3897187{col 43}{space 1}    0.56{col 52}{space 3}0.579{col 60}{space 4} -.553348{col 73}{space 3}   .98736
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .3450317{col 32}{space 2} .2164106{col 43}{space 1}    1.59{col 52}{space 3}0.113{col 60}{space 4}-.0827454{col 73}{space 3} .7728088
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2} -.432675{col 32}{space 2} .1892015{col 43}{space 1}   -2.29{col 52}{space 3}0.024{col 60}{space 4}-.8066681{col 73}{space 3}-.0586818
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 15 31}Instrumented:{space 2}tchrtreat_m{p_end}
{p 0 15 31}Instruments:{space 3}Asnt_aft Math_1st std_avg_mscore 5.district#1b.stratum 5.district#2.stratum 11.district#1b.stratum 11.district#2.stratum 20.district#1b.stratum 20.district#2.stratum 24.district#1b.stratum 24.district#2.stratum 28.district#1b.stratum 28.district#2.stratum 34.district#1b.stratum 34.district#2.stratum 35.district#1b.stratum 35.district#2.stratum 37.district#1b.stratum 37.district#2.stratum 45.district#1b.stratum 45.district#2.stratum 50.district#1b.stratum 50.district#2.stratum 51.district#1b.stratum 51.district#2.stratum 55.district#1b.stratum 55.district#2.stratum 60.district#1b.stratum 60.district#2.stratum 63.district#1b.stratum 63.district#2.stratum 69.district#1b.stratum 69.district#2.stratum treat{p_end}
{hline 84}

{com}.                                         
.                         
.                         * LATE regression with interaction
.                         gen tchrtreatxmscore = tchrtreat_m*std_avg_mscore
{txt}(3,590 missing values generated)

{com}.                         svy: ivregress 2sls stdIRTmatgr9 Asnt_aft Math_1st std_avg_mscore district#stratum (tchrtreat_m tchrtreatxmscore = treat treatxmscore)
{res}{txt}(running {bf:ivregress} on estimation sample)
{res}
{txt}Survey: Instrumental variables (2SLS) regression

{col 1}Number of strata{col 20}= {res}       31{txt}{col 49}Number of obs{col 67}= {res}     5,738
{txt}{col 1}Number of PSUs{col 20}= {res}      174{txt}{col 49}Population size{col 67}={res} 33,148.347
{txt}{col 49}Design df{col 67}= {res}       143
{txt}{col 49}F({res}  35{txt},{res}    109{txt}){col 67}= {res}      9.68
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.2336

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}      stdIRTmatgr9{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}tchrtreat_m {c |}{col 20}{res}{space 2}-.0686102{col 32}{space 2} .1096487{col 43}{space 1}   -0.63{col 52}{space 3}0.532{col 60}{space 4} -.285352{col 73}{space 3} .1481316
{txt}{space 2}tchrtreatxmscore {c |}{col 20}{res}{space 2}-.2981287{col 32}{space 2} .2662195{col 43}{space 1}   -1.12{col 52}{space 3}0.265{col 60}{space 4}-.8243627{col 73}{space 3} .2281053
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .0139463{col 32}{space 2} .0747128{col 43}{space 1}    0.19{col 52}{space 3}0.852{col 60}{space 4}-.1337379{col 73}{space 3} .1616305
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2}-.1314258{col 32}{space 2} .0641293{col 43}{space 1}   -2.05{col 52}{space 3}0.042{col 60}{space 4}-.2581896{col 73}{space 3} -.004662
{txt}{space 4}std_avg_mscore {c |}{col 20}{res}{space 2} .0865389{col 32}{space 2} .0635647{col 43}{space 1}    1.36{col 52}{space 3}0.176{col 60}{space 4}-.0391089{col 73}{space 3} .2121867
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2}        0{col 32}{txt}  (empty)
{space 9}Morang#1  {c |}{col 20}{res}{space 2} .3556006{col 32}{space 2} .2339323{col 43}{space 1}    1.52{col 52}{space 3}0.131{col 60}{space 4}-.1068116{col 73}{space 3} .8180127
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .2850743{col 32}{space 2} .2304141{col 43}{space 1}    1.24{col 52}{space 3}0.218{col 60}{space 4}-.1703835{col 73}{space 3} .7405321
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .5780332{col 32}{space 2} .3382987{col 43}{space 1}    1.71{col 52}{space 3}0.090{col 60}{space 4}-.0906792{col 73}{space 3} 1.246746
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .5240829{col 32}{space 2} .3264657{col 43}{space 1}    1.61{col 52}{space 3}0.111{col 60}{space 4}-.1212392{col 73}{space 3} 1.169405
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .0866186{col 32}{space 2} .2738495{col 43}{space 1}    0.32{col 52}{space 3}0.752{col 60}{space 4}-.4546976{col 73}{space 3} .6279347
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .1940399{col 32}{space 2} .2065526{col 43}{space 1}    0.94{col 52}{space 3}0.349{col 60}{space 4} -.214251{col 73}{space 3} .6023307
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .8144169{col 32}{space 2} .2790081{col 43}{space 1}    2.92{col 52}{space 3}0.004{col 60}{space 4} .2629037{col 73}{space 3}  1.36593
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .7158991{col 32}{space 2} .2602665{col 43}{space 1}    2.75{col 52}{space 3}0.007{col 60}{space 4} .2014324{col 73}{space 3} 1.230366
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .9265324{col 32}{space 2} .2914355{col 43}{space 1}    3.18{col 52}{space 3}0.002{col 60}{space 4} .3504542{col 73}{space 3} 1.502611
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.570931{col 32}{space 2} .3067914{col 43}{space 1}    5.12{col 52}{space 3}0.000{col 60}{space 4} .9644993{col 73}{space 3} 2.177364
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .5706228{col 32}{space 2} .2847171{col 43}{space 1}    2.00{col 52}{space 3}0.047{col 60}{space 4} .0078248{col 73}{space 3} 1.133421
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .5071206{col 32}{space 2} .2480116{col 43}{space 1}    2.04{col 52}{space 3}0.043{col 60}{space 4} .0168779{col 73}{space 3} .9973633
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} 1.138539{col 32}{space 2} .2521056{col 43}{space 1}    4.52{col 52}{space 3}0.000{col 60}{space 4} .6402042{col 73}{space 3} 1.636875
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} 1.040621{col 32}{space 2} .2038532{col 43}{space 1}    5.10{col 52}{space 3}0.000{col 60}{space 4} .6376655{col 73}{space 3} 1.443575
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} 1.112168{col 32}{space 2} .2953594{col 43}{space 1}    3.77{col 52}{space 3}0.000{col 60}{space 4} .5283331{col 73}{space 3} 1.696002
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} 1.613876{col 32}{space 2}  .371658{col 43}{space 1}    4.34{col 52}{space 3}0.000{col 60}{space 4} .8792221{col 73}{space 3} 2.348529
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .7491214{col 32}{space 2} .2198123{col 43}{space 1}    3.41{col 52}{space 3}0.001{col 60}{space 4} .3146201{col 73}{space 3} 1.183623
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} 1.127643{col 32}{space 2} .4071948{col 43}{space 1}    2.77{col 52}{space 3}0.006{col 60}{space 4} .3227443{col 73}{space 3} 1.932542
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .2500068{col 32}{space 2} .2563366{col 43}{space 1}    0.98{col 52}{space 3}0.331{col 60}{space 4}-.2566917{col 73}{space 3} .7567054
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .2682029{col 32}{space 2} .3413095{col 43}{space 1}    0.79{col 52}{space 3}0.433{col 60}{space 4} -.406461{col 73}{space 3} .9428668
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .7921768{col 32}{space 2} .2605958{col 43}{space 1}    3.04{col 52}{space 3}0.003{col 60}{space 4} .2770591{col 73}{space 3} 1.307295
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .4453868{col 32}{space 2} .2818818{col 43}{space 1}    1.58{col 52}{space 3}0.116{col 60}{space 4}-.1118067{col 73}{space 3}  1.00258
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.4013311{col 32}{space 2} .2565578{col 43}{space 1}   -1.56{col 52}{space 3}0.120{col 60}{space 4} -.908467{col 73}{space 3} .1058048
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2}-.1132152{col 32}{space 2} .2139223{col 43}{space 1}   -0.53{col 52}{space 3}0.597{col 60}{space 4}-.5360737{col 73}{space 3} .3096433
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.2476366{col 32}{space 2} .2360708{col 43}{space 1}   -1.05{col 52}{space 3}0.296{col 60}{space 4} -.714276{col 73}{space 3} .2190028
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2}-.2067714{col 32}{space 2} .2527105{col 43}{space 1}   -0.82{col 52}{space 3}0.415{col 60}{space 4}-.7063023{col 73}{space 3} .2927596
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2}-.2322766{col 32}{space 2}  .302478{col 43}{space 1}   -0.77{col 52}{space 3}0.444{col 60}{space 4}-.8301825{col 73}{space 3} .3656294
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2}-.1049159{col 32}{space 2} .2788644{col 43}{space 1}   -0.38{col 52}{space 3}0.707{col 60}{space 4}-.6561448{col 73}{space 3} .4463131
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .2130954{col 32}{space 2}  .391843{col 43}{space 1}    0.54{col 52}{space 3}0.587{col 60}{space 4}-.5614576{col 73}{space 3} .9876485
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .2568539{col 32}{space 2} .2468425{col 43}{space 1}    1.04{col 52}{space 3}0.300{col 60}{space 4}-.2310776{col 73}{space 3} .7447855
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.4064441{col 32}{space 2} .2170869{col 43}{space 1}   -1.87{col 52}{space 3}0.063{col 60}{space 4}-.8355581{col 73}{space 3} .0226699
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 15 31}Instrumented:{space 2}tchrtreat_m tchrtreatxmscore{p_end}
{p 0 15 31}Instruments:{space 3}Asnt_aft Math_1st std_avg_mscore 5.district#1b.stratum 5.district#2.stratum 11.district#1b.stratum 11.district#2.stratum 20.district#1b.stratum 20.district#2.stratum 24.district#1b.stratum 24.district#2.stratum 28.district#1b.stratum 28.district#2.stratum 34.district#1b.stratum 34.district#2.stratum 35.district#1b.stratum 35.district#2.stratum 37.district#1b.stratum 37.district#2.stratum 45.district#1b.stratum 45.district#2.stratum 50.district#1b.stratum 50.district#2.stratum 51.district#1b.stratum 51.district#2.stratum 55.district#1b.stratum 55.district#2.stratum 60.district#1b.stratum 60.district#2.stratum 63.district#1b.stratum 63.district#2.stratum 69.district#1b.stratum 69.district#2.stratum treat treatxmscore{p_end}
{hline 84}

{com}.                                                 
.                         test tchrtreat_m tchrtreatxmscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreat_m = 0{p_end}
{p 0 7}{space 1}{text:( 2)}{space 1} tchrtreatxmscore = 0{p_end}

{txt}       F(  2,   142) ={res}    1.91
{txt}{col 13}Prob > F ={res}    0.1522
{txt}
{com}.                         test tchrtreatxmscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreatxmscore = 0{p_end}

{txt}       F(  1,   143) ={res}    1.25
{txt}{col 13}Prob > F ={res}    0.2647
{txt}
{com}.                         lincom tchrtreat_m + tchrtreatxmscore  /* impact for schools with avg math teacher score 1 std deviation above the control mean */

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreat_m + tchrtreatxmscore = 0{p_end}

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}stdIRTmatgr9{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}(1) {c |}{col 14}{res}{space 2}-.3667389{col 26}{space 2} .2193897{col 37}{space 1}   -1.67{col 46}{space 3}0.097{col 54}{space 4}-.8004049{col 67}{space 3} .0669271
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         lincom tchrtreat_m - tchrtreatxmscore

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreat_m - tchrtreatxmscore = 0{p_end}

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}stdIRTmatgr9{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}(1) {c |}{col 14}{res}{space 2} .2295185{col 26}{space 2} .3430153{col 37}{space 1}    0.67{col 46}{space 3}0.504{col 54}{space 4}-.4485172{col 67}{space 3} .9075542
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                 
.                         
.                         
.         ****************************************************************************
.         ****GRADE 9, SCIENCE
.         ****************************************************************************
.         
.         use "`e_sci_9'", clear
{txt}(Endline student-level Science assessment dataset, Grade 9, Tests A & B)

{com}.         
.         egen RawSci9=rowtotal(Sci_*)
{txt}
{com}.         
.         *Calculate raw score on below grade items (grade 7 or lower)
.         egen sci9_EZ=rowtotal(Sci_002 Sci_004 Sci_006 Sci_009 Sci_010 ///
>                                                   Sci_019 Sci_022 Sci_025 Sci_032 Sci_037 Sci_038 Sci_041 ///
>                                                   Sci_042 Sci_056 Sci_073)
{txt}
{com}.                                                   
.         gen s9pct_EZ=sci9_EZ/9 if test=="Sci09A"
{txt}(3,368 missing values generated)

{com}.         replace s9pct_EZ=sci9_EZ/9 if test=="Sci09B"
{txt}(3,368 real changes made)

{com}.         
.         drop Sci_*
{txt}
{com}.         sort schoolid
{txt}
{com}.         
.         merge m:1 schoolid using "`sch_temp'" 
{res}
{txt}{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}               0
{txt}{col 5}matched{col 30}{res}           6,801{txt}  (_merge==3)
{col 5}{hline 41}

{com}.         //0 unmatched
.         drop _m
{txt}
{com}.         count if stu_serial=="" //3
  {res}3
{txt}
{com}.         drop if stu_serial=="" //3
{txt}(3 observations deleted)

{com}.         sort stu_serial
{txt}
{com}.         
.         *Merge with grade 9 students 
.         merge 1:1 stu_serial using Grade09_c
{res}{txt}{p 0 7 2}
(note: variable
stu_serial was 
str33, now str39 to accommodate using data's values)
{p_end}

{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}           2,742
{txt}{col 9}from master{col 30}{res}               1{txt}  (_merge==1)
{col 9}from using{col 30}{res}           2,741{txt}  (_merge==2)

{col 5}matched{col 30}{res}           6,797{txt}  (_merge==3)
{col 5}{hline 41}

{com}.         //2742 unmatched (1 master, 2741 using)
.         drop _m
{txt}
{com}.         
.         *Merge with grade 9 students science teachers
.         merge 1:1 stu_serial using "`g09scitc'"
{res}
{txt}{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}           3,540
{txt}{col 9}from master{col 30}{res}           3,540{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}matched{col 30}{res}           5,999{txt}  (_merge==3)
{col 5}{hline 41}

{com}.         //3540 unmatched (3540 master)
.         drop if _m==2 //0
{txt}(0 observations deleted)

{com}.         drop _m
{txt}
{com}.         
.         * Normalize grade 9 science IRT score, 1st for all items then for SSDP-focus items
.         svy, over(treat): mean theta_gr09 
{res}{txt}(running {bf:mean} on estimation sample)
{res}
{txt}Survey: Mean estimation

{col 1}Number of strata{col 18}= {res}     32{txt}{col 41}Number of obs{col 57}= {res}     6,798
{txt}{col 1}Number of PSUs{col 18}= {res}    203{txt}{col 41}Population size{col 57}={res} 39,150.793
{txt}{col 41}Design df{col 57}= {res}       171

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 20}{c |}       Mean{col 32}   Std. Err.{col 44}     [95% Con{col 57}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
c.theta_gr09@treat {c |}
{space 16}0  {c |}{col 20}{res}{space 2} .0487005{col 32}{space 2}  .052693{col 43}{space 5}-.0553121{col 57}{space 3}  .152713
{txt}{space 16}1  {c |}{col 20}{res}{space 2} .0017321{col 32}{space 2} .0523836{col 43}{space 5}-.1016697{col 57}{space 3}  .105134
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}.         mat b = e(b)
{txt}
{com}.         gen mean = b[1,1]
{txt}
{com}.         estat sd

{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{col 1}{text}        Over{col 14}{c |}       Mean{col 27}  Std. Dev.
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{space 10}c. {c |}
{space 2}theta_gr09@{c |}
{space 7}treat {c |}
{space 10}0  {c |}{col 14}{result}{space 2} .0487005{col 27}{space 2} .9101346
{txt}{space 10}1  {c |}{col 14}{result}{space 2} .0017321{col 27}{space 2} .8296223
{col 1}{text}{hline 13}{c BT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{res}{txt}
{com}.         mat sd = r(sd)
{txt}
{com}.         gen sd = sd[1,1]
{txt}
{com}.         gen stdIRTscigr9=(theta_gr09-mean)/sd
{txt}(2,741 missing values generated)

{com}.         drop mean sd
{txt}
{com}. 
.         svy, over(treat): mean theta_gr09_SSDP 
{res}{txt}(running {bf:mean} on estimation sample)
{res}
{txt}Survey: Mean estimation

{col 1}Number of strata{col 18}= {res}     32{txt}{col 46}Number of obs{col 62}= {res}     6,798
{txt}{col 1}Number of PSUs{col 18}= {res}    203{txt}{col 46}Population size{col 62}={res} 39,150.793
{txt}{col 46}Design df{col 62}= {res}       171

{txt}{hline 24}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 25}{c |}{col 37}  Linearized
{col 25}{c |}       Mean{col 37}   Std. Err.{col 49}     [95% Con{col 62}f. Interval]
{hline 24}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
c.theta_gr09_SSDP@treat {c |}
{space 21}0  {c |}{col 25}{res}{space 2} .0423976{col 37}{space 2} .0457169{col 48}{space 5}-.0478446{col 62}{space 3} .1326397
{txt}{space 21}1  {c |}{col 25}{res}{space 2}-.0098556{col 37}{space 2}  .042395{col 48}{space 5}-.0935404{col 62}{space 3} .0738293
{txt}{hline 24}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}.         mat b = e(b)
{txt}
{com}.         gen mean = b[1,1]
{txt}
{com}.         estat sd

{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{col 1}{text}        Over{col 14}{c |}       Mean{col 27}  Std. Dev.
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{space 10}c. {c |}
theta_gr09~P@{c |}
{space 7}treat {c |}
{space 10}0  {c |}{col 14}{result}{space 2} .0423976{col 27}{space 2} .8467724
{txt}{space 10}1  {c |}{col 14}{result}{space 2}-.0098556{col 27}{space 2} .7733766
{col 1}{text}{hline 13}{c BT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{res}{txt}
{com}.         mat sd = r(sd)
{txt}
{com}.         gen sd = sd[1,1]
{txt}
{com}.         gen stdIRTscigr9_SSDP=(theta_gr09_SSDP-mean)/sd
{txt}(2,741 missing values generated)

{com}.         drop mean sd
{txt}
{com}. 
.         svy, over(treat): mean RawSci9 
{res}{txt}(running {bf:mean} on estimation sample)
{res}
{txt}Survey: Mean estimation

{col 1}Number of strata{col 18}= {res}     32{txt}{col 38}Number of obs{col 54}= {res}     6,798
{txt}{col 1}Number of PSUs{col 18}= {res}    203{txt}{col 38}Population size{col 54}={res} 39,150.793
{txt}{col 38}Design df{col 54}= {res}       171

{txt}{hline 16}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 17}{c |}{col 29}  Linearized
{col 17}{c |}       Mean{col 29}   Std. Err.{col 41}     [95% Con{col 54}f. Interval]
{hline 16}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
c.RawSci9@treat {c |}
{space 13}0  {c |}{col 17}{res}{space 2}  16.4542{col 29}{space 2} .2913364{col 40}{space 5} 15.87912{col 54}{space 3} 17.02928
{txt}{space 13}1  {c |}{col 17}{res}{space 2}  16.1162{col 29}{space 2} .2821544{col 40}{space 5} 15.55924{col 54}{space 3} 16.67315
{txt}{hline 16}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}.         mat b = e(b)
{txt}
{com}.         gen mean = b[1,1]
{txt}
{com}.         estat sd

{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{col 1}{text}        Over{col 14}{c |}       Mean{col 27}  Std. Dev.
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{space 3}c.RawSci9@{c |}
{space 7}treat {c |}
{space 10}0  {c |}{col 14}{result}{space 2}  16.4542{col 27}{space 2}  5.21326
{txt}{space 10}1  {c |}{col 14}{result}{space 2}  16.1162{col 27}{space 2} 4.707071
{col 1}{text}{hline 13}{c BT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{res}{txt}
{com}.         mat sd = r(sd)
{txt}
{com}.         gen sd = sd[1,1]
{txt}
{com}.         gen stdRawSci9=(mean-RawSci9)/sd
{txt}(2,741 missing values generated)

{com}.         drop mean sd
{txt}
{com}. 
.         * Add control variables, only for latent skill values that include all items
.         * For wealth I generate IRT, dropping phone (see balance test file for reason)
.         gen dadseced=(f_educlevel>=2 & f_educlevel<=5)
{txt}
{com}.         gen momseced=(m_educlevel>=2 & m_educlevel<=5)
{txt}
{com}.         foreach var in fam_tv fam_bicycle fam_scooter fam_refrigerator fam_computer {c -(}
{txt}  2{com}.           replace `var'=. if `var'==9
{txt}  3{com}.           replace `var'=0 if `var'==2 /* change "no" from 2 to 0, 1 is "yes" */
{txt}  4{com}.           {c )-}
{txt}(125 real changes made, 125 to missing)
(2,575 real changes made)
(140 real changes made, 140 to missing)
(3,842 real changes made)
(278 real changes made, 278 to missing)
(5,181 real changes made)
(269 real changes made, 269 to missing)
(5,424 real changes made)
(316 real changes made, 316 to missing)
(5,701 real changes made)

{com}.         irt 2pl fam_tv fam_bicycle fam_scooter fam_refrigerator fam_computer
{res}{txt}
Fitting fixed-effects model:

Iteration 0:{space 3}log likelihood = {res:-17690.298}  
Iteration 1:{space 3}log likelihood = {res:-17670.022}  
Iteration 2:{space 3}log likelihood = {res:-17670.002}  
Iteration 3:{space 3}log likelihood = {res:-17670.002}  

Fitting full model:
{res}
{txt}Iteration 0:{space 3}log likelihood = {res: -16574.85}  
Iteration 1:{space 3}log likelihood = {res:-16223.114}  
Iteration 2:{space 3}log likelihood = {res: -16167.18}  
Iteration 3:{space 3}log likelihood = {res:-16166.118}  
Iteration 4:{space 3}log likelihood = {res:-16166.116}  
Iteration 5:{space 3}log likelihood = {res:-16166.116}  
{res}
{txt}Two-parameter logistic model{col 49}Number of obs{col 67}= {res}     6,748
{txt}Log likelihood = {res}-16166.116
{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_tv       {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 1.809415{col 26}{space 2} .0905381{col 37}{space 1}   19.99{col 46}{space 3}0.000{col 54}{space 4} 1.631964{col 67}{space 3} 1.986867
{txt}{space 8}Diff {c |}{col 14}{res}{space 2}-.4036514{col 26}{space 2} .0234061{col 37}{space 1}  -17.25{col 46}{space 3}0.000{col 54}{space 4}-.4495264{col 67}{space 3}-.3577763
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_bicycle  {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 1.348752{col 26}{space 2} .0598798{col 37}{space 1}   22.52{col 46}{space 3}0.000{col 54}{space 4} 1.231389{col 67}{space 3} 1.466114
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} .3003634{col 26}{space 2} .0259118{col 37}{space 1}   11.59{col 46}{space 3}0.000{col 54}{space 4} .2495772{col 67}{space 3} .3511496
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_scooter  {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 2.101249{col 26}{space 2} .1126331{col 37}{space 1}   18.66{col 46}{space 3}0.000{col 54}{space 4} 1.880492{col 67}{space 3} 2.322006
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} 1.031878{col 26}{space 2} .0326215{col 37}{space 1}   31.63{col 46}{space 3}0.000{col 54}{space 4} .9679412{col 67}{space 3} 1.095815
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_refrig~r {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 2.041589{col 26}{space 2} .1080392{col 37}{space 1}   18.90{col 46}{space 3}0.000{col 54}{space 4} 1.829836{col 67}{space 3} 2.253342
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} 1.224235{col 26}{space 2} .0372552{col 37}{space 1}   32.86{col 46}{space 3}0.000{col 54}{space 4} 1.151217{col 67}{space 3} 1.297254
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_computer {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 1.327451{col 26}{space 2} .0721492{col 37}{space 1}   18.40{col 46}{space 3}0.000{col 54}{space 4} 1.186041{col 67}{space 3} 1.468861
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} 1.877648{col 26}{space 2} .0740524{col 37}{space 1}   25.36{col 46}{space 3}0.000{col 54}{space 4} 1.732508{col 67}{space 3} 2.022788
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict assetindex, latent
{txt}(option {bf:ebmeans} assumed)
{res}{txt}(using 7 quadrature points)

{com}.         *Set 61 observations = . if no data on assets for them
.         replace assetindex=. if fam_tv==. & fam_bicycle==. & fam_scooter==. ///
>                                                         & fam_refrigerator==. & fam_computer==.
{txt}(2,791 real changes made, 2,791 to missing)

{com}.                                                         
.         tempfile analysis_g9s
{txt}
{com}.         save "`analysis_g9s'", replace
{txt}(note: file C:\Users\jschaf01\AppData\Local\Temp\ST_8e50_00000k.tmp not found)
file C:\Users\jschaf01\AppData\Local\Temp\ST_8e50_00000k.tmp saved

{com}.         
.         
.         
. * Grade 9 science, full endline sample, impact estimation (including het WRT avg sci teacher score)
. 
.                         use "`analysis_g9s'", clear
{txt}(Endline student-level Science assessment dataset, Grade 9, Tests A & B)

{com}.                         unique schoolid if avg_sscore~=. /* 186 schools, 6321 schools */
{txt}Number of unique values of schoolid is  {res}186
{txt}Number of records is  {res}6321
{txt}
{com}.                         
.                 * how does the avg sci teacher assessment score differ between treatment and control?
.                         svy: reg std_avg_sscore treat Asnt_aft Math_1st district#stratum        /* looks different, but p-value .18 */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       32{txt}{col 49}Number of obs{col 67}= {res}     6,321
{txt}{col 1}Number of PSUs{col 20}= {res}      186{txt}{col 49}Population size{col 67}={res} 36,420.098
{txt}{col 49}Design df{col 67}= {res}       154
{txt}{col 49}F({res}  34{txt},{res}    121{txt}){col 67}= {res}      2.76
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.3756

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}    std_avg_sscore{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2}-.1643533{col 32}{space 2} .1221962{col 43}{space 1}   -1.34{col 52}{space 3}0.181{col 60}{space 4}-.4057504{col 73}{space 3} .0770438
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .2434823{col 32}{space 2} .1424328{col 43}{space 1}    1.71{col 52}{space 3}0.089{col 60}{space 4}-.0378919{col 73}{space 3} .5248565
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2}-.0506656{col 32}{space 2} .1206099{col 43}{space 1}   -0.42{col 52}{space 3}0.675{col 60}{space 4} -.288929{col 73}{space 3} .1875978
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} 1.334488{col 32}{space 2} .6752565{col 43}{space 1}    1.98{col 52}{space 3}0.050{col 60}{space 4} .0005271{col 73}{space 3}  2.66845
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .7002512{col 32}{space 2}  .708588{col 43}{space 1}    0.99{col 52}{space 3}0.325{col 60}{space 4}-.6995559{col 73}{space 3} 2.100058
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} 1.124332{col 32}{space 2} .6999642{col 43}{space 1}    1.61{col 52}{space 3}0.110{col 60}{space 4}-.2584387{col 73}{space 3} 2.507103
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} 1.228545{col 32}{space 2} .6438528{col 43}{space 1}    1.91{col 52}{space 3}0.058{col 60}{space 4}-.0433784{col 73}{space 3} 2.500469
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .6686001{col 32}{space 2} .6970893{col 43}{space 1}    0.96{col 52}{space 3}0.339{col 60}{space 4}-.7084915{col 73}{space 3} 2.045692
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .8459116{col 32}{space 2} .6374119{col 43}{space 1}    1.33{col 52}{space 3}0.186{col 60}{space 4} -.413288{col 73}{space 3} 2.105111
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .8037419{col 32}{space 2} .7039403{col 43}{space 1}    1.14{col 52}{space 3}0.255{col 60}{space 4}-.5868837{col 73}{space 3} 2.194367
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} 1.597034{col 32}{space 2} .6630556{col 43}{space 1}    2.41{col 52}{space 3}0.017{col 60}{space 4} .2871755{col 73}{space 3} 2.906892
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2}-1.068361{col 32}{space 2} 1.395605{col 43}{space 1}   -0.77{col 52}{space 3}0.445{col 60}{space 4}-3.825363{col 73}{space 3} 1.688641
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} 1.334544{col 32}{space 2} .6064878{col 43}{space 1}    2.20{col 52}{space 3}0.029{col 60}{space 4} .1364343{col 73}{space 3} 2.532653
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2}   .27341{col 32}{space 2} 1.669087{col 43}{space 1}    0.16{col 52}{space 3}0.870{col 60}{space 4}-3.023851{col 73}{space 3} 3.570671
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2}  1.24771{col 32}{space 2} .6626382{col 43}{space 1}    1.88{col 52}{space 3}0.062{col 60}{space 4}-.0613243{col 73}{space 3} 2.556744
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} 1.103243{col 32}{space 2} .6108207{col 43}{space 1}    1.81{col 52}{space 3}0.073{col 60}{space 4}-.1034263{col 73}{space 3} 2.309912
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} 1.497255{col 32}{space 2} .6132051{col 43}{space 1}    2.44{col 52}{space 3}0.016{col 60}{space 4} .2858753{col 73}{space 3} 2.708634
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} 1.646433{col 32}{space 2} .5844993{col 43}{space 1}    2.82{col 52}{space 3}0.005{col 60}{space 4}  .491762{col 73}{space 3} 2.801105
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2}   .29515{col 32}{space 2} .9057076{col 43}{space 1}    0.33{col 52}{space 3}0.745{col 60}{space 4}-1.494065{col 73}{space 3} 2.084365
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2}-.0024175{col 32}{space 2} 1.028409{col 43}{space 1}   -0.00{col 52}{space 3}0.998{col 60}{space 4}-2.034027{col 73}{space 3} 2.029193
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} 1.507003{col 32}{space 2} .6301234{col 43}{space 1}    2.39{col 52}{space 3}0.018{col 60}{space 4} .2622013{col 73}{space 3} 2.751804
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} 1.187222{col 32}{space 2} .6093641{col 43}{space 1}    1.95{col 52}{space 3}0.053{col 60}{space 4}-.0165694{col 73}{space 3} 2.391014
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .8655575{col 32}{space 2} .6868962{col 43}{space 1}    1.26{col 52}{space 3}0.210{col 60}{space 4}-.4913977{col 73}{space 3} 2.222513
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} 1.741336{col 32}{space 2} .6325705{col 43}{space 1}    2.75{col 52}{space 3}0.007{col 60}{space 4} .4917009{col 73}{space 3} 2.990972
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} 1.217749{col 32}{space 2} .6443486{col 43}{space 1}    1.89{col 52}{space 3}0.061{col 60}{space 4}-.0551534{col 73}{space 3} 2.490652
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} 1.410317{col 32}{space 2} .6106066{col 43}{space 1}    2.31{col 52}{space 3}0.022{col 60}{space 4} .2040708{col 73}{space 3} 2.616563
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2} 1.360089{col 32}{space 2} .6372474{col 43}{space 1}    2.13{col 52}{space 3}0.034{col 60}{space 4} .1012144{col 73}{space 3} 2.618964
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} 2.055164{col 32}{space 2} .6347186{col 43}{space 1}    3.24{col 52}{space 3}0.001{col 60}{space 4} .8012851{col 73}{space 3} 3.309043
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}    .9198{col 32}{space 2} .6366697{col 43}{space 1}    1.44{col 52}{space 3}0.151{col 60}{space 4}-.3379333{col 73}{space 3} 2.177533
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} 1.213748{col 32}{space 2} .6141781{col 43}{space 1}    1.98{col 52}{space 3}0.050{col 60}{space 4} .0004466{col 73}{space 3}  2.42705
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2} .9712736{col 32}{space 2} .6866316{col 43}{space 1}    1.41{col 52}{space 3}0.159{col 60}{space 4}-.3851589{col 73}{space 3} 2.327706
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2} .5149784{col 32}{space 2} .6521642{col 43}{space 1}    0.79{col 52}{space 3}0.431{col 60}{space 4}-.7733641{col 73}{space 3} 1.803321
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .8343163{col 32}{space 2} .6663027{col 43}{space 1}    1.25{col 52}{space 3}0.212{col 60}{space 4}-.4819566{col 73}{space 3} 2.150589
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} 1.357025{col 32}{space 2} .6345616{col 43}{space 1}    2.14{col 52}{space 3}0.034{col 60}{space 4} .1034565{col 73}{space 3} 2.610594
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-1.056491{col 32}{space 2} .5705116{col 43}{space 1}   -1.85{col 52}{space 3}0.066{col 60}{space 4} -2.18353{col 73}{space 3} .0705478
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         
.                         preserve
{txt}
{com}.                         keep if std_avg_sscore~=.
{txt}(3,218 observations deleted)

{com}.                         unique schoolid  /* 186 */
{txt}Number of unique values of schoolid is  {res}186
{txt}Number of records is  {res}6321
{txt}
{com}.                         sort schoolid
{txt}
{com}.                         by schoolid:keep if _n==1
{txt}(6,135 observations deleted)

{com}.                         count /* 186 */
  {res}186
{txt}
{com}.                         svy: reg std_avg_sscore treat district#stratum  /* no sig diff at school level */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       32{txt}{col 49}Number of obs{col 67}= {res}       186
{txt}{col 1}Number of PSUs{col 20}= {res}      186{txt}{col 49}Population size{col 67}={res} 1,106.8862
{txt}{col 49}Design df{col 67}= {res}       154
{txt}{col 49}F({res}  32{txt},{res}    123{txt}){col 67}= {res}      2.60
{txt}{col 49}Prob > F{col 67}= {res}    0.0001
{txt}{col 49}R-squared{col 67}= {res}    0.3759

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}    std_avg_sscore{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2}-.0263818{col 32}{space 2}  .122625{col 43}{space 1}   -0.22{col 52}{space 3}0.830{col 60}{space 4} -.268626{col 73}{space 3} .2158624
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .9366126{col 32}{space 2} .4469421{col 43}{space 1}    2.10{col 52}{space 3}0.038{col 60}{space 4} .0536839{col 73}{space 3} 1.819541
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2}  .507229{col 32}{space 2} .5220241{col 43}{space 1}    0.97{col 52}{space 3}0.333{col 60}{space 4}-.5240233{col 73}{space 3} 1.538481
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2}  .852564{col 32}{space 2} .5366651{col 43}{space 1}    1.59{col 52}{space 3}0.114{col 60}{space 4}-.2076114{col 73}{space 3}  1.91274
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .9052747{col 32}{space 2} .4906145{col 43}{space 1}    1.85{col 52}{space 3}0.067{col 60}{space 4}-.0639284{col 73}{space 3} 1.874478
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .1894078{col 32}{space 2} .5264458{col 43}{space 1}    0.36{col 52}{space 3}0.720{col 60}{space 4}-.8505796{col 73}{space 3} 1.229395
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2}  .410406{col 32}{space 2} .4767003{col 43}{space 1}    0.86{col 52}{space 3}0.391{col 60}{space 4}-.5313097{col 73}{space 3} 1.352122
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2}-.0155413{col 32}{space 2} .7864507{col 43}{space 1}   -0.02{col 52}{space 3}0.984{col 60}{space 4}-1.569165{col 73}{space 3} 1.538083
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} 1.160675{col 32}{space 2} .4843322{col 43}{space 1}    2.40{col 52}{space 3}0.018{col 60}{space 4} .2038825{col 73}{space 3} 2.117467
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2}-1.693341{col 32}{space 2} 1.193211{col 43}{space 1}   -1.42{col 52}{space 3}0.158{col 60}{space 4}-4.050515{col 73}{space 3} .6638321
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .8586617{col 32}{space 2}  .472001{col 43}{space 1}    1.82{col 52}{space 3}0.071{col 60}{space 4}-.0737707{col 73}{space 3} 1.791094
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2}-.0987587{col 32}{space 2} 1.669042{col 43}{space 1}   -0.06{col 52}{space 3}0.953{col 60}{space 4}-3.395932{col 73}{space 3} 3.198414
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .9215869{col 32}{space 2} .5005139{col 43}{space 1}    1.84{col 52}{space 3}0.068{col 60}{space 4}-.0671723{col 73}{space 3} 1.910346
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .7891693{col 32}{space 2} .4361028{col 43}{space 1}    1.81{col 52}{space 3}0.072{col 60}{space 4}-.0723465{col 73}{space 3} 1.650685
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} 1.104619{col 32}{space 2} .4473395{col 43}{space 1}    2.47{col 52}{space 3}0.015{col 60}{space 4} .2209048{col 73}{space 3} 1.988332
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2}  1.14937{col 32}{space 2} .4783351{col 43}{space 1}    2.40{col 52}{space 3}0.017{col 60}{space 4} .2044246{col 73}{space 3} 2.094315
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} .5788953{col 32}{space 2} .6416206{col 43}{space 1}    0.90{col 52}{space 3}0.368{col 60}{space 4}-.6886185{col 73}{space 3} 1.846409
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2}-.2683951{col 32}{space 2} 1.069649{col 43}{space 1}   -0.25{col 52}{space 3}0.802{col 60}{space 4}-2.381474{col 73}{space 3} 1.844684
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} 1.274976{col 32}{space 2}  .455244{col 43}{space 1}    2.80{col 52}{space 3}0.006{col 60}{space 4} .3756465{col 73}{space 3} 2.174305
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .8000584{col 32}{space 2} .4572566{col 43}{space 1}    1.75{col 52}{space 3}0.082{col 60}{space 4}-.1032464{col 73}{space 3} 1.703363
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .6262517{col 32}{space 2} .5443523{col 43}{space 1}    1.15{col 52}{space 3}0.252{col 60}{space 4}-.4491098{col 73}{space 3} 1.701613
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} 1.373966{col 32}{space 2} .4454317{col 43}{space 1}    3.08{col 52}{space 3}0.002{col 60}{space 4} .4940205{col 73}{space 3} 2.253911
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .9687722{col 32}{space 2} .4644088{col 43}{space 1}    2.09{col 52}{space 3}0.039{col 60}{space 4} .0513381{col 73}{space 3} 1.886206
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .9640147{col 32}{space 2}  .464562{col 43}{space 1}    2.08{col 52}{space 3}0.040{col 60}{space 4} .0462779{col 73}{space 3} 1.881751
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}  1.05874{col 32}{space 2} .4596269{col 43}{space 1}    2.30{col 52}{space 3}0.023{col 60}{space 4} .1507523{col 73}{space 3} 1.966727
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} 1.757249{col 32}{space 2} .4473843{col 43}{space 1}    3.93{col 52}{space 3}0.000{col 60}{space 4} .8734465{col 73}{space 3} 2.641051
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2} .5717471{col 32}{space 2} .4589247{col 43}{space 1}    1.25{col 52}{space 3}0.215{col 60}{space 4}-.3348531{col 73}{space 3} 1.478347
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} .9656566{col 32}{space 2}  .508024{col 43}{space 1}    1.90{col 52}{space 3}0.059{col 60}{space 4}-.0379389{col 73}{space 3} 1.969252
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2} .7164087{col 32}{space 2} .4850817{col 43}{space 1}    1.48{col 52}{space 3}0.142{col 60}{space 4}-.2418644{col 73}{space 3} 1.674682
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2} .3351122{col 32}{space 2} .4547576{col 43}{space 1}    0.74{col 52}{space 3}0.462{col 60}{space 4}-.5632561{col 73}{space 3}  1.23348
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .2410422{col 32}{space 2} .5464618{col 43}{space 1}    0.44{col 52}{space 3}0.660{col 60}{space 4}-.8384866{col 73}{space 3} 1.320571
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .9652522{col 32}{space 2} .4959504{col 43}{space 1}    1.95{col 52}{space 3}0.053{col 60}{space 4}-.0144919{col 73}{space 3} 1.944996
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.6440386{col 32}{space 2} .4367469{col 43}{space 1}   -1.47{col 52}{space 3}0.142{col 60}{space 4}-1.506827{col 73}{space 3} .2187497
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         restore
{txt}
{com}.                         
.                                                 
.                         *  prep interaction
.                         gen treatxsscore=treat*std_avg_sscore   
{txt}(3,218 missing values generated)

{com}. 
.                         
.                         * ITT estimation
.                         
.                         svy: reg stdIRTscigr9 treat std_avg_sscore treatxsscore Asnt_aft Math_1st district#stratum      /* 6321 obs */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       32{txt}{col 49}Number of obs{col 67}= {res}     6,321
{txt}{col 1}Number of PSUs{col 20}= {res}      186{txt}{col 49}Population size{col 67}={res} 36,420.098
{txt}{col 49}Design df{col 67}= {res}       154
{txt}{col 49}F({res}  36{txt},{res}    119{txt}){col 67}= {res}     23.83
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.1658

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}      stdIRTscigr9{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2}-.1333515{col 32}{space 2} .0655006{col 43}{space 1}   -2.04{col 52}{space 3}0.043{col 60}{space 4}-.2627473{col 73}{space 3}-.0039558
{txt}{space 4}std_avg_sscore {c |}{col 20}{res}{space 2}-.0306372{col 32}{space 2} .0562128{col 43}{space 1}   -0.55{col 52}{space 3}0.587{col 60}{space 4} -.141685{col 73}{space 3} .0804106
{txt}{space 6}treatxsscore {c |}{col 20}{res}{space 2}-.0028221{col 32}{space 2} .0722429{col 43}{space 1}   -0.04{col 52}{space 3}0.969{col 60}{space 4}-.1455372{col 73}{space 3} .1398929
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .0370681{col 32}{space 2} .0664862{col 43}{space 1}    0.56{col 52}{space 3}0.578{col 60}{space 4}-.0942746{col 73}{space 3} .1684108
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2}-.0768943{col 32}{space 2} .0681428{col 43}{space 1}   -1.13{col 52}{space 3}0.261{col 60}{space 4}-.2115096{col 73}{space 3} .0577211
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2}  .753328{col 32}{space 2} .2911587{col 43}{space 1}    2.59{col 52}{space 3}0.011{col 60}{space 4} .1781474{col 73}{space 3} 1.328509
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .0421211{col 32}{space 2} .2266967{col 43}{space 1}    0.19{col 52}{space 3}0.853{col 60}{space 4}-.4057155{col 73}{space 3} .4899577
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .0914297{col 32}{space 2} .2983285{col 43}{space 1}    0.31{col 52}{space 3}0.760{col 60}{space 4}-.4979146{col 73}{space 3}  .680774
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .7567849{col 32}{space 2} .3286477{col 43}{space 1}    2.30{col 52}{space 3}0.023{col 60}{space 4} .1075452{col 73}{space 3} 1.406025
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .4442947{col 32}{space 2} .3121076{col 43}{space 1}    1.42{col 52}{space 3}0.157{col 60}{space 4}-.1722702{col 73}{space 3}  1.06086
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .1349712{col 32}{space 2} .2579967{col 43}{space 1}    0.52{col 52}{space 3}0.602{col 60}{space 4}-.3746981{col 73}{space 3} .6446406
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .2074093{col 32}{space 2}   .23255{col 43}{space 1}    0.89{col 52}{space 3}0.374{col 60}{space 4}-.2519905{col 73}{space 3} .6668091
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} 1.069247{col 32}{space 2} .3146743{col 43}{space 1}    3.40{col 52}{space 3}0.001{col 60}{space 4} .4476121{col 73}{space 3} 1.690883
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .3744089{col 32}{space 2} .3306941{col 43}{space 1}    1.13{col 52}{space 3}0.259{col 60}{space 4}-.2788733{col 73}{space 3} 1.027691
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .7898591{col 32}{space 2} .2530308{col 43}{space 1}    3.12{col 52}{space 3}0.002{col 60}{space 4} .2899998{col 73}{space 3} 1.289718
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.305878{col 32}{space 2} .2602296{col 43}{space 1}    5.02{col 52}{space 3}0.000{col 60}{space 4} .7917976{col 73}{space 3} 1.819958
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .1711162{col 32}{space 2} .2396239{col 43}{space 1}    0.71{col 52}{space 3}0.476{col 60}{space 4} -.302258{col 73}{space 3} .6444903
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .1289324{col 32}{space 2}  .260888{col 43}{space 1}    0.49{col 52}{space 3}0.622{col 60}{space 4}-.3864487{col 73}{space 3} .6443134
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} .9379695{col 32}{space 2} .2421688{col 43}{space 1}    3.87{col 52}{space 3}0.000{col 60}{space 4} .4595679{col 73}{space 3} 1.416371
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} .7513448{col 32}{space 2} .2199595{col 43}{space 1}    3.42{col 52}{space 3}0.001{col 60}{space 4} .3168174{col 73}{space 3} 1.185872
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} .6708808{col 32}{space 2} .2544044{col 43}{space 1}    2.64{col 52}{space 3}0.009{col 60}{space 4}  .168308{col 73}{space 3} 1.173454
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} .8602775{col 32}{space 2} .3207242{col 43}{space 1}    2.68{col 52}{space 3}0.008{col 60}{space 4} .2266906{col 73}{space 3} 1.493864
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .6228316{col 32}{space 2} .2566197{col 43}{space 1}    2.43{col 52}{space 3}0.016{col 60}{space 4} .1158824{col 73}{space 3} 1.129781
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} 1.017395{col 32}{space 2} .2779759{col 43}{space 1}    3.66{col 52}{space 3}0.000{col 60}{space 4} .4682567{col 73}{space 3} 1.566533
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .2209349{col 32}{space 2}   .23134{col 43}{space 1}    0.96{col 52}{space 3}0.341{col 60}{space 4}-.2360746{col 73}{space 3} .6779444
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .2333905{col 32}{space 2} .2998932{col 43}{space 1}    0.78{col 52}{space 3}0.438{col 60}{space 4} -.359045{col 73}{space 3} .8258261
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .5699515{col 32}{space 2} .2378814{col 43}{space 1}    2.40{col 52}{space 3}0.018{col 60}{space 4} .1000195{col 73}{space 3} 1.039883
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2}  .432936{col 32}{space 2}  .264853{col 43}{space 1}    1.63{col 52}{space 3}0.104{col 60}{space 4} -.090278{col 73}{space 3} .9561499
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.3727312{col 32}{space 2} .2405587{col 43}{space 1}   -1.55{col 52}{space 3}0.123{col 60}{space 4} -.847952{col 73}{space 3} .1024896
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2}-.1524175{col 32}{space 2} .2392586{col 43}{space 1}   -0.64{col 52}{space 3}0.525{col 60}{space 4}  -.62507{col 73}{space 3} .3202351
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.2291808{col 32}{space 2} .2556046{col 43}{space 1}   -0.90{col 52}{space 3}0.371{col 60}{space 4}-.7341246{col 73}{space 3}  .275763
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} .1132791{col 32}{space 2}  .221944{col 43}{space 1}    0.51{col 52}{space 3}0.611{col 60}{space 4}-.3251687{col 73}{space 3} .5517269
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2}-.1640774{col 32}{space 2} .3378084{col 43}{space 1}   -0.49{col 52}{space 3}0.628{col 60}{space 4}-.8314138{col 73}{space 3} .5032589
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2} -.309038{col 32}{space 2} .3831742{col 43}{space 1}   -0.81{col 52}{space 3}0.421{col 60}{space 4}-1.065994{col 73}{space 3} .4479181
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .3382826{col 32}{space 2} .3524626{col 43}{space 1}    0.96{col 52}{space 3}0.339{col 60}{space 4}-.3580031{col 73}{space 3} 1.034568
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .4241196{col 32}{space 2} .2542674{col 43}{space 1}    1.67{col 52}{space 3}0.097{col 60}{space 4}-.0781827{col 73}{space 3} .9264218
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.2992726{col 32}{space 2} .2130921{col 43}{space 1}   -1.40{col 52}{space 3}0.162{col 60}{space 4}-.7202335{col 73}{space 3} .1216882
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         /* negative base impact -.13, negative interaction but small */
.                                                         
.                         test treat treatxsscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}treat = 0{p_end}
{p 0 7}{space 1}{text:( 2)}{space 1} treatxsscore = 0{p_end}

{txt}       F(  2,   153) ={res}    2.07
{txt}{col 13}Prob > F ={res}    0.1297
{txt}
{com}.                         test treatxsscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}treatxsscore = 0{p_end}

{txt}       F(  1,   154) ={res}    0.00
{txt}{col 13}Prob > F ={res}    0.9689
{txt}
{com}.                         lincom treat + treatxsscore  /* for teachers 1 std dev above average of teacher test score */

{p 0 7}{space 1}{text:( 1)}{space 1} {res}treat + treatxsscore = 0{p_end}

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}stdIRTscigr9{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}(1) {c |}{col 14}{res}{space 2}-.1361736{col 26}{space 2} .0949034{col 37}{space 1}   -1.43{col 46}{space 3}0.153{col 54}{space 4}-.3236541{col 67}{space 3} .0513068
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         
.                         /* for avg school by sci teacher score, can rule out positive effect */
.                         /* for school with sci teacher score 1 std dev above mean, can rule out effect over .05 */
.                         
.                         * check what un-interacted treatment looks like on this smaller sample
.                         svy:reg stdIRTscigr9 treat Asnt_aft Math_1st district#stratum if treatxsscore~=.
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       32{txt}{col 49}Number of obs{col 67}= {res}     6,321
{txt}{col 1}Number of PSUs{col 20}= {res}      186{txt}{col 49}Population size{col 67}={res} 36,420.098
{txt}{col 49}Design df{col 67}= {res}       154
{txt}{col 49}F({res}  34{txt},{res}    121{txt}){col 67}= {res}     23.43
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.1652

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}      stdIRTscigr9{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2} -.128179{col 32}{space 2} .0645149{col 43}{space 1}   -1.99{col 52}{space 3}0.049{col 60}{space 4}-.2556274{col 73}{space 3}-.0007306
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .0288139{col 32}{space 2} .0687216{col 43}{space 1}    0.42{col 52}{space 3}0.676{col 60}{space 4}-.1069448{col 73}{space 3} .1645727
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} -.075149{col 32}{space 2}  .067832{col 43}{space 1}   -1.11{col 52}{space 3}0.270{col 60}{space 4}-.2091503{col 73}{space 3} .0588523
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .7118471{col 32}{space 2} .2729534{col 43}{space 1}    2.61{col 52}{space 3}0.010{col 60}{space 4} .1726309{col 73}{space 3} 1.251063
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .0203887{col 32}{space 2} .2162803{col 43}{space 1}    0.09{col 52}{space 3}0.925{col 60}{space 4}-.4068704{col 73}{space 3} .4476478
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .0570094{col 32}{space 2} .2859132{col 43}{space 1}    0.20{col 52}{space 3}0.842{col 60}{space 4}-.5078087{col 73}{space 3} .6218275
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .7185858{col 32}{space 2} .3197555{col 43}{space 1}    2.25{col 52}{space 3}0.026{col 60}{space 4} .0869127{col 73}{space 3} 1.350259
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .4235764{col 32}{space 2} .3039392{col 43}{space 1}    1.39{col 52}{space 3}0.165{col 60}{space 4}-.1768519{col 73}{space 3} 1.024005
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .1093106{col 32}{space 2} .2467406{col 43}{space 1}    0.44{col 52}{space 3}0.658{col 60}{space 4}-.3781226{col 73}{space 3} .5967437
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .1825027{col 32}{space 2} .2187238{col 43}{space 1}    0.83{col 52}{space 3}0.405{col 60}{space 4}-.2495835{col 73}{space 3}  .614589
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} 1.018444{col 32}{space 2} .3052377{col 43}{space 1}    3.34{col 52}{space 3}0.001{col 60}{space 4} .4154505{col 73}{space 3} 1.621437
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .4091249{col 32}{space 2}  .344585{col 43}{space 1}    1.19{col 52}{space 3}0.237{col 60}{space 4}-.2715986{col 73}{space 3} 1.089849
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .7476862{col 32}{space 2} .2414196{col 43}{space 1}    3.10{col 52}{space 3}0.002{col 60}{space 4} .2707646{col 73}{space 3} 1.224608
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.300356{col 32}{space 2} .2693571{col 43}{space 1}    4.83{col 52}{space 3}0.000{col 60}{space 4} .7682444{col 73}{space 3} 1.832468
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .1319888{col 32}{space 2} .2243466{col 43}{space 1}    0.59{col 52}{space 3}0.557{col 60}{space 4}-.3112052{col 73}{space 3} .5751828
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .0943809{col 32}{space 2} .2505535{col 43}{space 1}    0.38{col 52}{space 3}0.707{col 60}{space 4}-.4005845{col 73}{space 3} .5893463
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} .8907282{col 32}{space 2} .2286273{col 43}{space 1}    3.90{col 52}{space 3}0.000{col 60}{space 4} .4390777{col 73}{space 3} 1.342379
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} .6990568{col 32}{space 2} .2027742{col 43}{space 1}    3.45{col 52}{space 3}0.001{col 60}{space 4} .2984787{col 73}{space 3} 1.099635
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} .6636521{col 32}{space 2} .2397893{col 43}{space 1}    2.77{col 52}{space 3}0.006{col 60}{space 4} .1899512{col 73}{space 3} 1.137353
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} .8614441{col 32}{space 2} .3255268{col 43}{space 1}    2.65{col 52}{space 3}0.009{col 60}{space 4} .2183698{col 73}{space 3} 1.504519
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .5759626{col 32}{space 2} .2406778{col 43}{space 1}    2.39{col 52}{space 3}0.018{col 60}{space 4} .1005065{col 73}{space 3} 1.051419
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .9802391{col 32}{space 2} .2694842{col 43}{space 1}    3.64{col 52}{space 3}0.000{col 60}{space 4} .4478762{col 73}{space 3} 1.512602
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2}  .194304{col 32}{space 2} .2174004{col 43}{space 1}    0.89{col 52}{space 3}0.373{col 60}{space 4}-.2351679{col 73}{space 3} .6237759
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .1786685{col 32}{space 2} .2816294{col 43}{space 1}    0.63{col 52}{space 3}0.527{col 60}{space 4} -.377687{col 73}{space 3}  .735024
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .5325511{col 32}{space 2} .2226081{col 43}{space 1}    2.39{col 52}{space 3}0.018{col 60}{space 4} .0927914{col 73}{space 3} .9723108
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .3882829{col 32}{space 2} .2554774{col 43}{space 1}    1.52{col 52}{space 3}0.131{col 60}{space 4}-.1164096{col 73}{space 3} .8929755
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.4157699{col 32}{space 2} .2254019{col 43}{space 1}   -1.84{col 52}{space 3}0.067{col 60}{space 4}-.8610487{col 73}{space 3} .0295089
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2}-.2167007{col 32}{space 2}  .213682{col 43}{space 1}   -1.01{col 52}{space 3}0.312{col 60}{space 4} -.638827{col 73}{space 3} .2054256
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.2574093{col 32}{space 2} .2422444{col 43}{space 1}   -1.06{col 52}{space 3}0.290{col 60}{space 4}-.7359603{col 73}{space 3} .2211416
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} .0756949{col 32}{space 2} .2095227{col 43}{space 1}    0.36{col 52}{space 3}0.718{col 60}{space 4}-.3382147{col 73}{space 3} .4896045
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2}-.1941134{col 32}{space 2} .3279319{col 43}{space 1}   -0.59{col 52}{space 3}0.555{col 60}{space 4}-.8419389{col 73}{space 3} .4537121
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2}-.3248591{col 32}{space 2} .3724892{col 43}{space 1}   -0.87{col 52}{space 3}0.384{col 60}{space 4}-1.060707{col 73}{space 3} .4109888
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .3118396{col 32}{space 2} .3521362{col 43}{space 1}    0.89{col 52}{space 3}0.377{col 60}{space 4}-.3838014{col 73}{space 3}  1.00748
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .3825856{col 32}{space 2} .2356754{col 43}{space 1}    1.62{col 52}{space 3}0.107{col 60}{space 4}-.0829884{col 73}{space 3} .8481596
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.2660898{col 32}{space 2} .2034506{col 43}{space 1}   -1.31{col 52}{space 3}0.193{col 60}{space 4}-.6680041{col 73}{space 3} .1358245
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         svy:reg stdIRTscigr9 treat Asnt_aft Math_1st district#stratum  /* sample change doesn't make a big difference */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       32{txt}{col 49}Number of obs{col 67}= {res}     6,798
{txt}{col 1}Number of PSUs{col 20}= {res}      203{txt}{col 49}Population size{col 67}={res} 39,150.793
{txt}{col 49}Design df{col 67}= {res}       171
{txt}{col 49}F({res}  34{txt},{res}    138{txt}){col 67}= {res}     22.65
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.1601

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}      stdIRTscigr9{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2}-.1090109{col 32}{space 2} .0600623{col 43}{space 1}   -1.81{col 52}{space 3}0.071{col 60}{space 4}-.2275699{col 73}{space 3} .0095482
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .0668068{col 32}{space 2} .0664222{col 43}{space 1}    1.01{col 52}{space 3}0.316{col 60}{space 4}-.0643063{col 73}{space 3} .1979198
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2}-.0708573{col 32}{space 2} .0643514{col 43}{space 1}   -1.10{col 52}{space 3}0.272{col 60}{space 4}-.1978827{col 73}{space 3} .0561681
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .7082246{col 32}{space 2}  .282211{col 43}{space 1}    2.51{col 52}{space 3}0.013{col 60}{space 4} .1511588{col 73}{space 3}  1.26529
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .0203381{col 32}{space 2} .2196751{col 43}{space 1}    0.09{col 52}{space 3}0.926{col 60}{space 4} -.413286{col 73}{space 3} .4539622
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2}  .053972{col 32}{space 2} .2859064{col 43}{space 1}    0.19{col 52}{space 3}0.850{col 60}{space 4}-.5103883{col 73}{space 3} .6183324
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .6749354{col 32}{space 2} .3060542{col 43}{space 1}    2.21{col 52}{space 3}0.029{col 60}{space 4} .0708046{col 73}{space 3} 1.279066
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .4229553{col 32}{space 2} .2987833{col 43}{space 1}    1.42{col 52}{space 3}0.159{col 60}{space 4}-.1668232{col 73}{space 3} 1.012734
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2}  .107143{col 32}{space 2} .2472933{col 43}{space 1}    0.43{col 52}{space 3}0.665{col 60}{space 4}-.3809976{col 73}{space 3} .5952836
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .1641805{col 32}{space 2} .2235194{col 43}{space 1}    0.73{col 52}{space 3}0.464{col 60}{space 4} -.277032{col 73}{space 3} .6053929
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .8816235{col 32}{space 2} .3261698{col 43}{space 1}    2.70{col 52}{space 3}0.008{col 60}{space 4} .2377859{col 73}{space 3} 1.525461
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .3511915{col 32}{space 2} .3004615{col 43}{space 1}    1.17{col 52}{space 3}0.244{col 60}{space 4}-.2418997{col 73}{space 3} .9442827
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .7406364{col 32}{space 2} .2441984{col 43}{space 1}    3.03{col 52}{space 3}0.003{col 60}{space 4}  .258605{col 73}{space 3} 1.222668
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.077072{col 32}{space 2} .2813347{col 43}{space 1}    3.83{col 52}{space 3}0.000{col 60}{space 4} .5217355{col 73}{space 3} 1.632408
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .1281711{col 32}{space 2} .2261264{col 43}{space 1}    0.57{col 52}{space 3}0.572{col 60}{space 4}-.3181874{col 73}{space 3} .5745296
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .0895778{col 32}{space 2} .2618859{col 43}{space 1}    0.34{col 52}{space 3}0.733{col 60}{space 4}-.4273676{col 73}{space 3} .6065233
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} .8952943{col 32}{space 2} .2327641{col 43}{space 1}    3.85{col 52}{space 3}0.000{col 60}{space 4} .4358334{col 73}{space 3} 1.354755
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} .6913857{col 32}{space 2} .2063624{col 43}{space 1}    3.35{col 52}{space 3}0.001{col 60}{space 4}   .28404{col 73}{space 3} 1.098731
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} .6616097{col 32}{space 2} .2438649{col 43}{space 1}    2.71{col 52}{space 3}0.007{col 60}{space 4} .1802364{col 73}{space 3} 1.142983
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} .6632475{col 32}{space 2} .2866832{col 43}{space 1}    2.31{col 52}{space 3}0.022{col 60}{space 4} .0973539{col 73}{space 3} 1.229141
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .4936701{col 32}{space 2} .2305061{col 43}{space 1}    2.14{col 52}{space 3}0.034{col 60}{space 4} .0386663{col 73}{space 3} .9486739
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .9931003{col 32}{space 2} .2685537{col 43}{space 1}    3.70{col 52}{space 3}0.000{col 60}{space 4} .4629931{col 73}{space 3} 1.523208
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .1954066{col 32}{space 2} .2188654{col 43}{space 1}    0.89{col 52}{space 3}0.373{col 60}{space 4}-.2366193{col 73}{space 3} .6274325
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .1710478{col 32}{space 2} .2884294{col 43}{space 1}    0.59{col 52}{space 3}0.554{col 60}{space 4}-.3982928{col 73}{space 3} .7403883
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .5218378{col 32}{space 2} .2263758{col 43}{space 1}    2.31{col 52}{space 3}0.022{col 60}{space 4}  .074987{col 73}{space 3} .9686887
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .3925341{col 32}{space 2} .2610942{col 43}{space 1}    1.50{col 52}{space 3}0.135{col 60}{space 4}-.1228487{col 73}{space 3} .9079168
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2} -.423609{col 32}{space 2} .2269455{col 43}{space 1}   -1.87{col 52}{space 3}0.064{col 60}{space 4}-.8715845{col 73}{space 3} .0243664
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2}-.2084165{col 32}{space 2} .2224092{col 43}{space 1}   -0.94{col 52}{space 3}0.350{col 60}{space 4}-.6474376{col 73}{space 3} .2306046
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.3015248{col 32}{space 2} .2354932{col 43}{space 1}   -1.28{col 52}{space 3}0.202{col 60}{space 4}-.7663728{col 73}{space 3} .1633231
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} .0860482{col 32}{space 2} .2122591{col 43}{space 1}    0.41{col 52}{space 3}0.686{col 60}{space 4}-.3329372{col 73}{space 3} .5050336
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2}-.1399056{col 32}{space 2} .3016999{col 43}{space 1}   -0.46{col 52}{space 3}0.643{col 60}{space 4}-.7354413{col 73}{space 3}   .45563
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2}-.2585097{col 32}{space 2} .2699114{col 43}{space 1}   -0.96{col 52}{space 3}0.340{col 60}{space 4}-.7912969{col 73}{space 3} .2742775
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .3160387{col 32}{space 2} .3528917{col 43}{space 1}    0.90{col 52}{space 3}0.372{col 60}{space 4}-.3805462{col 73}{space 3} 1.012624
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2}  .371128{col 32}{space 2} .2420399{col 43}{space 1}    1.53{col 52}{space 3}0.127{col 60}{space 4}-.1066428{col 73}{space 3} .8488987
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.2993839{col 32}{space 2} .2081832{col 43}{space 1}   -1.44{col 52}{space 3}0.152{col 60}{space 4}-.7103239{col 73}{space 3} .1115561
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         
.                         * Set up for LATE 
.                         
.                         * Generate dummy variable for LATE regressions: teacher actually trained in 2 types of training
.                         gen tchrtreat_s=ssdp_s_t*treat
{txt}(3,576 missing values generated)

{com}.                                                 
.                         summ tchrtreat_s treat std_avg_sscore

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}tchrtreat_s {c |}{res}      5,963    .2014087    .3989899          0          1
{txt}{space 7}treat {c |}{res}      6,798    .4930862     .499989          0          1
{txt}std_avg_ss~e {c |}{res}      6,321    .0791506    .8737343  -3.897635   1.240489
{txt}
{com}.                         count if tchrtreat_s~=. & std_avg_sscore~=.    /* 5724 */
  {res}5,724
{txt}
{com}.                                                                                                 
.                         * LATE regression without interaction  but with the standardized teacher sci score as a regressor  
.                         
.                         svy: ivregress 2sls stdIRTscigr9 Asnt_aft Math_1st std_avg_sscore district#stratum  (tchrtreat_s = treat) /*This works. */
{res}{txt}(running {bf:ivregress} on estimation sample)
{res}
{txt}Survey: Instrumental variables (2SLS) regression

{col 1}Number of strata{col 20}= {res}       32{txt}{col 49}Number of obs{col 67}= {res}     5,724
{txt}{col 1}Number of PSUs{col 20}= {res}      177{txt}{col 49}Population size{col 67}={res} 33,611.422
{txt}{col 49}Design df{col 67}= {res}       145
{txt}{col 49}F({res}  35{txt},{res}    111{txt}){col 67}= {res}     11.97
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.1434

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}      stdIRTscigr9{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}tchrtreat_s {c |}{col 20}{res}{space 2}-.3344907{col 32}{space 2} .1934769{col 43}{space 1}   -1.73{col 52}{space 3}0.086{col 60}{space 4}  -.71689{col 73}{space 3} .0479087
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .0287577{col 32}{space 2} .0802834{col 43}{space 1}    0.36{col 52}{space 3}0.721{col 60}{space 4}-.1299191{col 73}{space 3} .1874345
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2}-.0880505{col 32}{space 2}  .076314{col 43}{space 1}   -1.15{col 52}{space 3}0.250{col 60}{space 4} -.238882{col 73}{space 3}  .062781
{txt}{space 4}std_avg_sscore {c |}{col 20}{res}{space 2}-.0299552{col 32}{space 2} .0492072{col 43}{space 1}   -0.61{col 52}{space 3}0.544{col 60}{space 4}-.1272111{col 73}{space 3} .0673008
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .7875546{col 32}{space 2}  .306268{col 43}{space 1}    2.57{col 52}{space 3}0.011{col 60}{space 4} .1822282{col 73}{space 3} 1.392881
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .0381933{col 32}{space 2} .2069295{col 43}{space 1}    0.18{col 52}{space 3}0.854{col 60}{space 4}-.3707944{col 73}{space 3} .4471811
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2}  .072805{col 32}{space 2} .2952057{col 43}{space 1}    0.25{col 52}{space 3}0.806{col 60}{space 4}-.5106572{col 73}{space 3} .6562672
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2}    .7158{col 32}{space 2} .3121615{col 43}{space 1}    2.29{col 52}{space 3}0.023{col 60}{space 4} .0988254{col 73}{space 3} 1.332775
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .4514511{col 32}{space 2} .3690659{col 43}{space 1}    1.22{col 52}{space 3}0.223{col 60}{space 4}-.2779927{col 73}{space 3} 1.180895
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .1642396{col 32}{space 2} .2631719{col 43}{space 1}    0.62{col 52}{space 3}0.534{col 60}{space 4} -.355909{col 73}{space 3} .6843881
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .2193798{col 32}{space 2} .2405894{col 43}{space 1}    0.91{col 52}{space 3}0.363{col 60}{space 4}-.2561353{col 73}{space 3}  .694895
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} 1.187082{col 32}{space 2} .3397297{col 43}{space 1}    3.49{col 52}{space 3}0.001{col 60}{space 4} .5156203{col 73}{space 3} 1.858544
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .4094454{col 32}{space 2} .2984796{col 43}{space 1}    1.37{col 52}{space 3}0.172{col 60}{space 4}-.1804874{col 73}{space 3} .9993782
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2}  .868898{col 32}{space 2} .2548129{col 43}{space 1}    3.41{col 52}{space 3}0.001{col 60}{space 4} .3652706{col 73}{space 3} 1.372525
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.279284{col 32}{space 2} .1986016{col 43}{space 1}    6.44{col 52}{space 3}0.000{col 60}{space 4} .8867559{col 73}{space 3} 1.671812
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2}  .191422{col 32}{space 2} .2388557{col 43}{space 1}    0.80{col 52}{space 3}0.424{col 60}{space 4}-.2806666{col 73}{space 3} .6635106
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .0962213{col 32}{space 2} .2833036{col 43}{space 1}    0.34{col 52}{space 3}0.735{col 60}{space 4}-.4637168{col 73}{space 3} .6561593
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} .9825453{col 32}{space 2} .2367158{col 43}{space 1}    4.15{col 52}{space 3}0.000{col 60}{space 4}  .514686{col 73}{space 3} 1.450405
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} .5954037{col 32}{space 2}  .219208{col 43}{space 1}    2.72{col 52}{space 3}0.007{col 60}{space 4} .1621479{col 73}{space 3}  1.02866
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} .6045183{col 32}{space 2} .2432471{col 43}{space 1}    2.49{col 52}{space 3}0.014{col 60}{space 4} .1237501{col 73}{space 3} 1.085286
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} .9083752{col 32}{space 2} .2657705{col 43}{space 1}    3.42{col 52}{space 3}0.001{col 60}{space 4} .3830906{col 73}{space 3}  1.43366
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .7188314{col 32}{space 2} .2767081{col 43}{space 1}    2.60{col 52}{space 3}0.010{col 60}{space 4}  .171929{col 73}{space 3} 1.265734
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .9127297{col 32}{space 2} .2683706{col 43}{space 1}    3.40{col 52}{space 3}0.001{col 60}{space 4}  .382306{col 73}{space 3} 1.443153
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .2476519{col 32}{space 2} .2291545{col 43}{space 1}    1.08{col 52}{space 3}0.282{col 60}{space 4}-.2052627{col 73}{space 3} .7005665
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .1592718{col 32}{space 2} .2959438{col 43}{space 1}    0.54{col 52}{space 3}0.591{col 60}{space 4}-.4256491{col 73}{space 3} .7441927
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .6284393{col 32}{space 2}  .219569{col 43}{space 1}    2.86{col 52}{space 3}0.005{col 60}{space 4} .1944699{col 73}{space 3} 1.062409
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .4758944{col 32}{space 2}  .276554{col 43}{space 1}    1.72{col 52}{space 3}0.087{col 60}{space 4}-.0707035{col 73}{space 3} 1.022492
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2} -.319254{col 32}{space 2} .2344849{col 43}{space 1}   -1.36{col 52}{space 3}0.175{col 60}{space 4}-.7827039{col 73}{space 3} .1441959
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .0659137{col 32}{space 2} .4193214{col 43}{space 1}    0.16{col 52}{space 3}0.875{col 60}{space 4} -.762858{col 73}{space 3} .8946854
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.1702445{col 32}{space 2} .2485919{col 43}{space 1}   -0.68{col 52}{space 3}0.495{col 60}{space 4}-.6615764{col 73}{space 3} .3210875
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} .2092779{col 32}{space 2} .2084751{col 43}{space 1}    1.00{col 52}{space 3}0.317{col 60}{space 4}-.2027647{col 73}{space 3} .6213204
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2}-.3084065{col 32}{space 2} .2720445{col 43}{space 1}   -1.13{col 52}{space 3}0.259{col 60}{space 4}-.8460914{col 73}{space 3} .2292784
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2}-.0292621{col 32}{space 2} .3841143{col 43}{space 1}   -0.08{col 52}{space 3}0.939{col 60}{space 4}-.7884484{col 73}{space 3} .7299242
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .4030743{col 32}{space 2} .3634944{col 43}{space 1}    1.11{col 52}{space 3}0.269{col 60}{space 4}-.3153577{col 73}{space 3} 1.121506
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .4766371{col 32}{space 2}  .235488{col 43}{space 1}    2.02{col 52}{space 3}0.045{col 60}{space 4} .0112046{col 73}{space 3} .9420697
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.3198315{col 32}{space 2} .1947958{col 43}{space 1}   -1.64{col 52}{space 3}0.103{col 60}{space 4}-.7048374{col 73}{space 3} .0651745
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 15 31}Instrumented:{space 2}tchrtreat_s{p_end}
{p 0 15 31}Instruments:{space 3}Asnt_aft Math_1st std_avg_sscore 2b.district#2.stratum 5.district#1b.stratum 5.district#2.stratum 11.district#1b.stratum 11.district#2.stratum 20.district#1b.stratum 20.district#2.stratum 24.district#1b.stratum 24.district#2.stratum 28.district#1b.stratum 28.district#2.stratum 34.district#1b.stratum 34.district#2.stratum 35.district#1b.stratum 35.district#2.stratum 37.district#1b.stratum 37.district#2.stratum 45.district#1b.stratum 45.district#2.stratum 50.district#1b.stratum 50.district#2.stratum 51.district#1b.stratum 51.district#2.stratum 55.district#1b.stratum 55.district#2.stratum 60.district#1b.stratum 60.district#2.stratum 63.district#1b.stratum 63.district#2.stratum 69.district#1b.stratum 69.district#2.stratum treat{p_end}
{hline 84}

{com}.                                 
.                         
.                         * LATE regression with interaction
.                         gen tchrtreatxsscore = tchrtreat_s*std_avg_sscore
{txt}(3,815 missing values generated)

{com}.                         svy: ivregress 2sls stdIRTscigr9 Asnt_aft Math_1st std_avg_sscore district#stratum (tchrtreat_s tchrtreatxsscore = treat treatxsscore)
{res}{txt}(running {bf:ivregress} on estimation sample)
{res}
{txt}Survey: Instrumental variables (2SLS) regression

{col 1}Number of strata{col 20}= {res}       32{txt}{col 49}Number of obs{col 67}= {res}     5,724
{txt}{col 1}Number of PSUs{col 20}= {res}      177{txt}{col 49}Population size{col 67}={res} 33,611.422
{txt}{col 49}Design df{col 67}= {res}       145
{txt}{col 49}F({res}  36{txt},{res}    110{txt}){col 67}= {res}     11.81
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.1434

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}      stdIRTscigr9{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}tchrtreat_s {c |}{col 20}{res}{space 2}-.3351384{col 32}{space 2} .1996715{col 43}{space 1}   -1.68{col 52}{space 3}0.095{col 60}{space 4}-.7297809{col 73}{space 3} .0595042
{txt}{space 2}tchrtreatxsscore {c |}{col 20}{res}{space 2} .0046793{col 32}{space 2} .2760969{col 43}{space 1}    0.02{col 52}{space 3}0.987{col 60}{space 4} -.541015{col 73}{space 3} .5503736
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .0285493{col 32}{space 2} .0780661{col 43}{space 1}    0.37{col 52}{space 3}0.715{col 60}{space 4}-.1257451{col 73}{space 3} .1828438
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} -.087796{col 32}{space 2} .0756469{col 43}{space 1}   -1.16{col 52}{space 3}0.248{col 60}{space 4}-.2373091{col 73}{space 3}  .061717
{txt}{space 4}std_avg_sscore {c |}{col 20}{res}{space 2}-.0307923{col 32}{space 2} .0643869{col 43}{space 1}   -0.48{col 52}{space 3}0.633{col 60}{space 4}-.1580504{col 73}{space 3} .0964658
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .7885439{col 32}{space 2} .3113604{col 43}{space 1}    2.53{col 52}{space 3}0.012{col 60}{space 4} .1731526{col 73}{space 3} 1.403935
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .0386193{col 32}{space 2} .2082674{col 43}{space 1}    0.19{col 52}{space 3}0.853{col 60}{space 4}-.3730127{col 73}{space 3} .4502513
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .0738854{col 32}{space 2} .2939864{col 43}{space 1}    0.25{col 52}{space 3}0.802{col 60}{space 4}-.5071667{col 73}{space 3} .6549376
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .7170648{col 32}{space 2} .3136367{col 43}{space 1}    2.29{col 52}{space 3}0.024{col 60}{space 4} .0971745{col 73}{space 3} 1.336955
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .4524814{col 32}{space 2} .3731279{col 43}{space 1}    1.21{col 52}{space 3}0.227{col 60}{space 4}-.2849909{col 73}{space 3} 1.189954
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .1667707{col 32}{space 2}  .301997{col 43}{space 1}    0.55{col 52}{space 3}0.582{col 60}{space 4}-.4301142{col 73}{space 3} .7636555
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .2206301{col 32}{space 2}  .247983{col 43}{space 1}    0.89{col 52}{space 3}0.375{col 60}{space 4}-.2694983{col 73}{space 3} .7107586
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} 1.186999{col 32}{space 2} .3396698{col 43}{space 1}    3.49{col 52}{space 3}0.001{col 60}{space 4} .5156551{col 73}{space 3} 1.858342
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .4088662{col 32}{space 2}  .287861{col 43}{space 1}    1.42{col 52}{space 3}0.158{col 60}{space 4}-.1600794{col 73}{space 3} .9778118
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .8694723{col 32}{space 2} .2551086{col 43}{space 1}    3.41{col 52}{space 3}0.001{col 60}{space 4} .3652604{col 73}{space 3} 1.373684
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.279825{col 32}{space 2} .1994058{col 43}{space 1}    6.42{col 52}{space 3}0.000{col 60}{space 4} .8857071{col 73}{space 3} 1.673942
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .1923817{col 32}{space 2} .2453512{col 43}{space 1}    0.78{col 52}{space 3}0.434{col 60}{space 4} -.292545{col 73}{space 3} .6773083
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .0972256{col 32}{space 2} .2885802{col 43}{space 1}    0.34{col 52}{space 3}0.737{col 60}{space 4}-.4731415{col 73}{space 3} .6675927
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} .9834397{col 32}{space 2}   .24228{col 43}{space 1}    4.06{col 52}{space 3}0.000{col 60}{space 4}  .504583{col 73}{space 3} 1.462296
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} .5970421{col 32}{space 2} .2322174{col 43}{space 1}    2.57{col 52}{space 3}0.011{col 60}{space 4} .1380737{col 73}{space 3} 1.056011
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} .6077276{col 32}{space 2} .3117366{col 43}{space 1}    1.95{col 52}{space 3}0.053{col 60}{space 4}-.0084071{col 73}{space 3} 1.223862
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} .9075757{col 32}{space 2} .2672236{col 43}{space 1}    3.40{col 52}{space 3}0.001{col 60}{space 4} .3794191{col 73}{space 3} 1.435732
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .7194361{col 32}{space 2} .2763699{col 43}{space 1}    2.60{col 52}{space 3}0.010{col 60}{space 4} .1732022{col 73}{space 3}  1.26567
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .9137575{col 32}{space 2} .2748791{col 43}{space 1}    3.32{col 52}{space 3}0.001{col 60}{space 4} .3704701{col 73}{space 3} 1.457045
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .2497604{col 32}{space 2} .2631988{col 43}{space 1}    0.95{col 52}{space 3}0.344{col 60}{space 4}-.2704414{col 73}{space 3} .7699622
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .1609233{col 32}{space 2} .3233151{col 43}{space 1}    0.50{col 52}{space 3}0.619{col 60}{space 4}-.4780959{col 73}{space 3} .7999426
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .6303233{col 32}{space 2} .2424225{col 43}{space 1}    2.60{col 52}{space 3}0.010{col 60}{space 4} .1511851{col 73}{space 3} 1.109461
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .4763918{col 32}{space 2} .2774919{col 43}{space 1}    1.72{col 52}{space 3}0.088{col 60}{space 4}-.0720596{col 73}{space 3} 1.024843
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.3188125{col 32}{space 2} .2360478{col 43}{space 1}   -1.35{col 52}{space 3}0.179{col 60}{space 4}-.7853514{col 73}{space 3} .1477264
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .0672884{col 32}{space 2} .4240179{col 43}{space 1}    0.16{col 52}{space 3}0.874{col 60}{space 4}-.7707658{col 73}{space 3} .9053426
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.1683694{col 32}{space 2} .2682949{col 43}{space 1}   -0.63{col 52}{space 3}0.531{col 60}{space 4}-.6986433{col 73}{space 3} .3619046
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} .2103049{col 32}{space 2} .2160405{col 43}{space 1}    0.97{col 52}{space 3}0.332{col 60}{space 4}-.2166904{col 73}{space 3} .6373002
{txt}{space 10}Jumla#1  {c |}{col 20}{res}{space 2}-.3073524{col 32}{space 2} .2768293{col 43}{space 1}   -1.11{col 52}{space 3}0.269{col 60}{space 4}-.8544944{col 73}{space 3} .2397895
{txt}{space 10}Jumla#2  {c |}{col 20}{res}{space 2}-.0283696{col 32}{space 2} .3859386{col 43}{space 1}   -0.07{col 52}{space 3}0.942{col 60}{space 4}-.7911617{col 73}{space 3} .7344224
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2}  .403931{col 32}{space 2}   .36808{col 43}{space 1}    1.10{col 52}{space 3}0.274{col 60}{space 4}-.3235642{col 73}{space 3} 1.131426
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .4784627{col 32}{space 2} .2502889{col 43}{space 1}    1.91{col 52}{space 3}0.058{col 60}{space 4}-.0162232{col 73}{space 3} .9731486
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.3208277{col 32}{space 2} .2035344{col 43}{space 1}   -1.58{col 52}{space 3}0.117{col 60}{space 4}-.7231051{col 73}{space 3} .0814497
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 15 31}Instrumented:{space 2}tchrtreat_s tchrtreatxsscore{p_end}
{p 0 15 31}Instruments:{space 3}Asnt_aft Math_1st std_avg_sscore 2b.district#2.stratum 5.district#1b.stratum 5.district#2.stratum 11.district#1b.stratum 11.district#2.stratum 20.district#1b.stratum 20.district#2.stratum 24.district#1b.stratum 24.district#2.stratum 28.district#1b.stratum 28.district#2.stratum 34.district#1b.stratum 34.district#2.stratum 35.district#1b.stratum 35.district#2.stratum 37.district#1b.stratum 37.district#2.stratum 45.district#1b.stratum 45.district#2.stratum 50.district#1b.stratum 50.district#2.stratum 51.district#1b.stratum 51.district#2.stratum 55.district#1b.stratum 55.district#2.stratum 60.district#1b.stratum 60.district#2.stratum 63.district#1b.stratum 63.district#2.stratum 69.district#1b.stratum 69.district#2.stratum treat treatxsscore{p_end}
{hline 84}

{com}.                         /* not much interaction */
.                                                 
.                         test tchrtreat_s tchrtreatxsscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreat_s = 0{p_end}
{p 0 7}{space 1}{text:( 2)}{space 1} tchrtreatxsscore = 0{p_end}

{txt}       F(  2,   144) ={res}    1.49
{txt}{col 13}Prob > F ={res}    0.2293
{txt}
{com}.                         test tchrtreatxsscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreatxsscore = 0{p_end}

{txt}       F(  1,   145) ={res}    0.00
{txt}{col 13}Prob > F ={res}    0.9865
{txt}
{com}.                         lincom tchrtreat_s + tchrtreatxsscore  /* impact for schools with avg msci teacher score 1 std deviation above the control mean */

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreat_s + tchrtreatxsscore = 0{p_end}

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}stdIRTscigr9{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}(1) {c |}{col 14}{res}{space 2}-.3304591{col 26}{space 2} .2967459{col 37}{space 1}   -1.11{col 46}{space 3}0.267{col 54}{space 4}-.9169654{col 67}{space 3} .2560473
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         lincom tchrtreat_s - tchrtreatxsscore

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreat_s - tchrtreatxsscore = 0{p_end}

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}stdIRTscigr9{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}(1) {c |}{col 14}{res}{space 2}-.3398177{col 26}{space 2} .3796553{col 37}{space 1}   -0.90{col 46}{space 3}0.372{col 54}{space 4}-1.090191{col 67}{space 3} .4105558
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         
.                         /* no evidence of interaction */
. 
.                         
.         ****************************************************************************
.         ****GRADE 10, MATH
.         ****************************************************************************
.         
.         use "`e_math_10'", clear
{txt}(Endline student-level Math assessment dataset, Grade 10, Tests A, B & C)

{com}.         
.         egen RawMath10=rowtotal(Math_*)
{txt}
{com}.         *Calculate raw score on below grade items (grade 8 or lower)
.         egen math10_EZ=rowtotal(Math_002 Math_003 Math_005 Math_006 Math_008 ///
>                                                         Math_009 Math_017 Math_018 Math_019 Math_020 Math_021 Math_025 ///
>                                                         Math_026 Math_043 Math_044 Math_045 Math_046 Math_047 Math_050 ///
>                                                         Math_054 Math_055 Math_062)
{txt}
{com}.         
.         gen m10pct_EZ=math10_EZ/14 if test=="Math10A"
{txt}(3,190 missing values generated)

{com}.         replace m10pct_EZ=math10_EZ/13 if test=="Math10B"
{txt}(2,934 real changes made)

{com}.         replace m10pct_EZ=math10_EZ/14 if test=="Math10C"
{txt}(256 real changes made)

{com}.         
.         drop Math_*
{txt}
{com}.         sort schoolid
{txt}
{com}.         
.         merge m:1 schoolid using "`sch_temp'" 
{res}
{txt}{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}              14
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}              14{txt}  (_merge==2)

{col 5}matched{col 30}{res}           5,833{txt}  (_merge==3)
{col 5}{hline 41}

{com}.         //14 unmatched
.         list distname study schoolid if _m~=3 /*12 from Jumla, 1 each Panchthar, Kavre*/
{txt}
      {c TLC}{hline 12}{c -}{hline 18}{c -}{hline 10}{c TRC}
      {c |} {res}  distname           studyarm   schoolid {txt}{c |}
      {c LT}{hline 12}{c -}{hline 18}{c -}{hline 10}{c RT}
5834. {c |} {res} Panchthar            Control    1411217 {txt}{c |}
5835. {c |} {res}Kavrepalan            Control   16842045 {txt}{c |}
5836. {c |} {res}     Jumla            Control   44100717 {txt}{c |}
5837. {c |} {res}     Jumla      Training Only   44102138 {txt}{c |}
5838. {c |} {res}     Jumla   Training with VA   44107024 {txt}{c |}
      {c LT}{hline 12}{c -}{hline 18}{c -}{hline 10}{c RT}
5839. {c |} {res}     Jumla            Control   44111224 {txt}{c |}
5840. {c |} {res}     Jumla      Training Only   44114010 {txt}{c |}
5841. {c |} {res}     Jumla            Control   44114710 {txt}{c |}
5842. {c |} {res}     Jumla            Control   44116810 {txt}{c |}
5843. {c |} {res}     Jumla      Training Only   44117524 {txt}{c |}
      {c LT}{hline 12}{c -}{hline 18}{c -}{hline 10}{c RT}
5844. {c |} {res}     Jumla            Control   44118231 {txt}{c |}
5845. {c |} {res}     Jumla            Control   44119624 {txt}{c |}
5846. {c |} {res}     Jumla   Training with VA   44120310 {txt}{c |}
5847. {c |} {res}     Jumla   Training with VA   44121024 {txt}{c |}
      {c BLC}{hline 12}{c -}{hline 18}{c -}{hline 10}{c BRC}

{com}.         drop if _m~=3 //14
{txt}(14 observations deleted)

{com}.         count if stu_serial=="" //0
  {res}0
{txt}
{com}.         drop _m
{txt}
{com}.         sort stu_serial
{txt}
{com}.         
.         *Merge with grade 10 students 
.         merge 1:1 stu_serial using Grade10_c
{res}{txt}{p 0 7 2}
(note: variable
stu_serial was 
str33, now str39 to accommodate using data's values)
{p_end}
(label yn already defined)

{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}           3,245
{txt}{col 9}from master{col 30}{res}               1{txt}  (_merge==1)
{col 9}from using{col 30}{res}           3,244{txt}  (_merge==2)

{col 5}matched{col 30}{res}           5,832{txt}  (_merge==3)
{col 5}{hline 41}

{com}.         //3245 unmatched (1 master, 3244 using)
.         drop _m
{txt}
{com}.         
.         *Merge with grade 10 students math teachers
.         merge 1:1 stu_serial using "`g10mattc'"
{res}
{txt}{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}           3,547
{txt}{col 9}from master{col 30}{res}           3,547{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}matched{col 30}{res}           5,530{txt}  (_merge==3)
{col 5}{hline 41}

{com}.         //3547 unmatched (3547 master)
.         drop if _m==2 //0
{txt}(0 observations deleted)

{com}.         drop _m
{txt}
{com}.         
.         * Normalize grade 10 math IRT score, 1st for all items then for SSDP-focus items
.         svy, over(treat): mean theta_gr10 
{res}{txt}(running {bf:mean} on estimation sample)
{res}
{txt}Survey: Mean estimation

{col 1}Number of strata{col 18}= {res}     30{txt}{col 41}Number of obs{col 57}= {res}     5,833
{txt}{col 1}Number of PSUs{col 18}= {res}    189{txt}{col 41}Population size{col 57}={res} 35,586.058
{txt}{col 41}Design df{col 57}= {res}       159

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 20}{c |}       Mean{col 32}   Std. Err.{col 44}     [95% Con{col 57}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
c.theta_gr10@treat {c |}
{space 16}0  {c |}{col 20}{res}{space 2}-.0013278{col 32}{space 2}  .063199{col 43}{space 5}-.1261455{col 57}{space 3} .1234899
{txt}{space 16}1  {c |}{col 20}{res}{space 2}-.0338757{col 32}{space 2} .0852744{col 43}{space 5}-.2022924{col 57}{space 3}  .134541
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}.         mat b = e(b)
{txt}
{com}.         gen mean = b[1,1]
{txt}
{com}.         estat sd

{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{col 1}{text}        Over{col 14}{c |}       Mean{col 27}  Std. Dev.
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{space 10}c. {c |}
{space 2}theta_gr10@{c |}
{space 7}treat {c |}
{space 10}0  {c |}{col 14}{result}{space 2}-.0013278{col 27}{space 2} .9210132
{txt}{space 10}1  {c |}{col 14}{result}{space 2}-.0338757{col 27}{space 2} .9190455
{col 1}{text}{hline 13}{c BT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{res}{txt}
{com}.         mat sd = r(sd)
{txt}
{com}.         gen sd = sd[1,1]
{txt}
{com}.         gen stdIRTmatgr10=(theta_gr10-mean)/sd
{txt}(3,244 missing values generated)

{com}.         drop mean sd
{txt}
{com}. 
.         svy, over(treat): mean theta_gr10_SSDP 
{res}{txt}(running {bf:mean} on estimation sample)
{res}
{txt}Survey: Mean estimation

{col 1}Number of strata{col 18}= {res}     30{txt}{col 46}Number of obs{col 62}= {res}     5,833
{txt}{col 1}Number of PSUs{col 18}= {res}    189{txt}{col 46}Population size{col 62}={res} 35,586.058
{txt}{col 46}Design df{col 62}= {res}       159

{txt}{hline 24}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 25}{c |}{col 37}  Linearized
{col 25}{c |}       Mean{col 37}   Std. Err.{col 49}     [95% Con{col 62}f. Interval]
{hline 24}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
c.theta_gr10_SSDP@treat {c |}
{space 21}0  {c |}{col 25}{res}{space 2}-.0001302{col 37}{space 2} .0554931{col 48}{space 5}-.1097289{col 62}{space 3} .1094685
{txt}{space 21}1  {c |}{col 25}{res}{space 2}-.0380214{col 37}{space 2} .0748244{col 48}{space 5}-.1857994{col 62}{space 3} .1097565
{txt}{hline 24}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}.         mat b = e(b)
{txt}
{com}.         gen mean = b[1,1]
{txt}
{com}.         estat sd

{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{col 1}{text}        Over{col 14}{c |}       Mean{col 27}  Std. Dev.
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{space 10}c. {c |}
theta_gr10~P@{c |}
{space 7}treat {c |}
{space 10}0  {c |}{col 14}{result}{space 2}-.0001302{col 27}{space 2} .8577485
{txt}{space 10}1  {c |}{col 14}{result}{space 2}-.0380214{col 27}{space 2} .8590518
{col 1}{text}{hline 13}{c BT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{res}{txt}
{com}.         mat sd = r(sd)
{txt}
{com}.         gen sd = sd[1,1]
{txt}
{com}.         gen stdIRTmatgr10_SSDP=(theta_gr10_SSDP-mean)/sd
{txt}(3,244 missing values generated)

{com}.         drop mean sd
{txt}
{com}. 
.         svy, over(treat): mean RawMath10 
{res}{txt}(running {bf:mean} on estimation sample)
{res}
{txt}Survey: Mean estimation

{col 1}Number of strata{col 18}= {res}     30{txt}{col 40}Number of obs{col 56}= {res}     5,833
{txt}{col 1}Number of PSUs{col 18}= {res}    189{txt}{col 40}Population size{col 56}={res} 35,586.058
{txt}{col 40}Design df{col 56}= {res}       159

{txt}{hline 18}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 19}{c |}{col 31}  Linearized
{col 19}{c |}       Mean{col 31}   Std. Err.{col 43}     [95% Con{col 56}f. Interval]
{hline 18}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
c.RawMath10@treat {c |}
{space 15}0  {c |}{col 19}{res}{space 2} 17.83413{col 31}{space 2} .4154858{col 42}{space 5} 17.01355{col 56}{space 3} 18.65471
{txt}{space 15}1  {c |}{col 19}{res}{space 2} 17.69947{col 31}{space 2} .5321871{col 42}{space 5}  16.6484{col 56}{space 3} 18.75054
{txt}{hline 18}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}.         mat b = e(b)
{txt}
{com}.         gen mean = b[1,1]
{txt}
{com}.         estat sd

{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{col 1}{text}        Over{col 14}{c |}       Mean{col 27}  Std. Dev.
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{space 1}c.RawMath10@{c |}
{space 7}treat {c |}
{space 10}0  {c |}{col 14}{result}{space 2} 17.83413{col 27}{space 2} 6.117291
{txt}{space 10}1  {c |}{col 14}{result}{space 2} 17.69947{col 27}{space 2} 6.066026
{col 1}{text}{hline 13}{c BT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{res}{txt}
{com}.         mat sd = r(sd)
{txt}
{com}.         gen sd = sd[1,1]
{txt}
{com}.         gen stdRawMath10=(mean-RawMath10)/sd
{txt}(3,244 missing values generated)

{com}.         drop mean sd
{txt}
{com}. 
.         * Add control variables, only for latent skill values that include all items
.         * For wealth I generate IRT, dropping phone (see balance test file for reason)
.         gen dadseced=(f_educlevel>=2 & f_educlevel<=5)
{txt}
{com}.         gen momseced=(m_educlevel>=2 & m_educlevel<=5)
{txt}
{com}.         foreach var in fam_tv fam_bicycle fam_scooter fam_refrigerator fam_computer {c -(}
{txt}  2{com}.           replace `var'=. if `var'==9
{txt}  3{com}.           replace `var'=0 if `var'==2 /* change "no" from 2 to 0, 1 is "yes" */
{txt}  4{com}.           {c )-}
{txt}(119 real changes made, 119 to missing)
(2,218 real changes made)
(166 real changes made, 166 to missing)
(3,250 real changes made)
(283 real changes made, 283 to missing)
(4,356 real changes made)
(273 real changes made, 273 to missing)
(4,485 real changes made)
(329 real changes made, 329 to missing)
(4,730 real changes made)

{com}.         irt 2pl fam_tv fam_bicycle fam_scooter fam_refrigerator fam_computer
{res}{txt}
Fitting fixed-effects model:

Iteration 0:{space 3}log likelihood = {res:-15553.008}  
Iteration 1:{space 3}log likelihood = {res:-15538.238}  
Iteration 2:{space 3}log likelihood = {res:-15538.233}  
Iteration 3:{space 3}log likelihood = {res:-15538.233}  

Fitting full model:
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-14380.163}  
Iteration 1:{space 3}log likelihood = {res:-14025.367}  
Iteration 2:{space 3}log likelihood = {res:-13985.362}  
Iteration 3:{space 3}log likelihood = {res:-13984.796}  
Iteration 4:{space 3}log likelihood = {res:-13984.795}  
{res}
{txt}Two-parameter logistic model{col 49}Number of obs{col 67}= {res}     5,774
{txt}Log likelihood = {res}-13984.795
{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_tv       {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 2.027463{col 26}{space 2} .1062553{col 37}{space 1}   19.08{col 46}{space 3}0.000{col 54}{space 4} 1.819206{col 67}{space 3} 2.235719
{txt}{space 8}Diff {c |}{col 14}{res}{space 2}-.3766669{col 26}{space 2} .0236068{col 37}{space 1}  -15.96{col 46}{space 3}0.000{col 54}{space 4}-.4229353{col 67}{space 3}-.3303985
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_bicycle  {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 1.229094{col 26}{space 2} .0566663{col 37}{space 1}   21.69{col 46}{space 3}0.000{col 54}{space 4}  1.11803{col 67}{space 3} 1.340158
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} .3000852{col 26}{space 2} .0296312{col 37}{space 1}   10.13{col 46}{space 3}0.000{col 54}{space 4} .2420091{col 67}{space 3} .3581613
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_scooter  {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 2.244363{col 26}{space 2} .1226376{col 37}{space 1}   18.30{col 46}{space 3}0.000{col 54}{space 4} 2.003998{col 67}{space 3} 2.484729
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} .9599425{col 26}{space 2} .0316703{col 37}{space 1}   30.31{col 46}{space 3}0.000{col 54}{space 4}   .89787{col 67}{space 3} 1.022015
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_refrig~r {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 2.318938{col 26}{space 2} .1275379{col 37}{space 1}   18.18{col 46}{space 3}0.000{col 54}{space 4} 2.068968{col 67}{space 3} 2.568908
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} 1.049128{col 26}{space 2} .0327878{col 37}{space 1}   32.00{col 46}{space 3}0.000{col 54}{space 4} .9848653{col 67}{space 3} 1.113391
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_computer {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 1.605933{col 26}{space 2} .0852369{col 37}{space 1}   18.84{col 46}{space 3}0.000{col 54}{space 4} 1.438872{col 67}{space 3} 1.772994
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} 1.532065{col 26}{space 2} .0554118{col 37}{space 1}   27.65{col 46}{space 3}0.000{col 54}{space 4}  1.42346{col 67}{space 3}  1.64067
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict assetindex, latent
{txt}(option {bf:ebmeans} assumed)
{res}{txt}(using 7 quadrature points)

{com}.         *Set 61 observations = . if no data on assets for them
.         replace assetindex=. if fam_tv==. & fam_bicycle==. & fam_scooter==. & fam_refrigerator==. & fam_computer==.
{txt}(3,303 real changes made, 3,303 to missing)

{com}.                                                         
.         tempfile analysis_g10m
{txt}
{com}.         
.         
.         
.         save "`analysis_g10m'", replace
{txt}(note: file C:\Users\jschaf01\AppData\Local\Temp\ST_8e50_00000m.tmp not found)
file C:\Users\jschaf01\AppData\Local\Temp\ST_8e50_00000m.tmp saved

{com}.                                                         
.                         
.                         
. ** Grade 10 math, full endline sample, impact estimation (including heterogeneity with respect to avg math teacher score)
. 
. use "`analysis_g10m'", clear
{txt}(Endline student-level Math assessment dataset, Grade 10, Tests A, B & C)

{com}.                         unique schoolid if avg_mscore~=.  /* still 178 schools, 5510 students*/
{txt}Number of unique values of schoolid is  {res}178
{txt}Number of records is  {res}5510
{txt}
{com}.                         
.                         
.                         * how does the avg math teacher assessment score differ between treatment and control?
.                         svy: reg std_avg_mscore treat Asnt_aft Math_1st district#stratum        /* No significant difference, but I'm using student-level observations here. */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       30{txt}{col 49}Number of obs{col 67}= {res}     5,510
{txt}{col 1}Number of PSUs{col 20}= {res}      178{txt}{col 49}Population size{col 67}={res} 33,589.472
{txt}{col 49}Design df{col 67}= {res}       148
{txt}{col 49}F({res}  32{txt},{res}    117{txt}){col 67}= {res}      1.51
{txt}{col 49}Prob > F{col 67}= {res}    0.0599
{txt}{col 49}R-squared{col 67}= {res}    0.2592

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}    std_avg_mscore{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2} .0767817{col 32}{space 2} .1383819{col 43}{space 1}    0.55{col 52}{space 3}0.580{col 60}{space 4}-.1966779{col 73}{space 3} .3502412
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .0151954{col 32}{space 2} .1371361{col 43}{space 1}    0.11{col 52}{space 3}0.912{col 60}{space 4}-.2558023{col 73}{space 3} .2861932
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} .0433846{col 32}{space 2} .1235145{col 43}{space 1}    0.35{col 52}{space 3}0.726{col 60}{space 4}-.2006951{col 73}{space 3} .2874643
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .2644418{col 32}{space 2} .2598637{col 43}{space 1}    1.02{col 52}{space 3}0.311{col 60}{space 4}-.2490807{col 73}{space 3} .7779643
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2}-.2425668{col 32}{space 2} .3096217{col 43}{space 1}   -0.78{col 52}{space 3}0.435{col 60}{space 4}-.8544171{col 73}{space 3} .3692836
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .0851705{col 32}{space 2} .2956189{col 43}{space 1}    0.29{col 52}{space 3}0.774{col 60}{space 4}-.4990086{col 73}{space 3} .6693497
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2}-.4505985{col 32}{space 2} .2928386{col 43}{space 1}   -1.54{col 52}{space 3}0.126{col 60}{space 4}-1.029284{col 73}{space 3} .1280865
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .2111504{col 32}{space 2} .5111682{col 43}{space 1}    0.41{col 52}{space 3}0.680{col 60}{space 4}-.7989806{col 73}{space 3} 1.221281
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2}-.2925339{col 32}{space 2} .4273557{col 43}{space 1}   -0.68{col 52}{space 3}0.495{col 60}{space 4}-1.137041{col 73}{space 3} .5519734
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .0306597{col 32}{space 2} .3509045{col 43}{space 1}    0.09{col 52}{space 3}0.930{col 60}{space 4}-.6627706{col 73}{space 3}   .72409
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2}-1.245326{col 32}{space 2} .9165926{col 43}{space 1}   -1.36{col 52}{space 3}0.176{col 60}{space 4}-3.056625{col 73}{space 3} .5659734
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .1764233{col 32}{space 2}  .372383{col 43}{space 1}    0.47{col 52}{space 3}0.636{col 60}{space 4}-.5594511{col 73}{space 3} .9122977
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2}  .016922{col 32}{space 2} .3680812{col 43}{space 1}    0.05{col 52}{space 3}0.963{col 60}{space 4}-.7104515{col 73}{space 3} .7442955
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2}-.0260936{col 32}{space 2} .7909143{col 43}{space 1}   -0.03{col 52}{space 3}0.974{col 60}{space 4}-1.589037{col 73}{space 3}  1.53685
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2}-.2864491{col 32}{space 2} .4385603{col 43}{space 1}   -0.65{col 52}{space 3}0.515{col 60}{space 4}-1.153098{col 73}{space 3} .5801998
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} -.322534{col 32}{space 2} .6222468{col 43}{space 1}   -0.52{col 52}{space 3}0.605{col 60}{space 4} -1.55217{col 73}{space 3}  .907102
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} .4307293{col 32}{space 2} .2480143{col 43}{space 1}    1.74{col 52}{space 3}0.085{col 60}{space 4}-.0593774{col 73}{space 3} .9208361
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} .1131314{col 32}{space 2} .2749107{col 43}{space 1}    0.41{col 52}{space 3}0.681{col 60}{space 4}-.4301258{col 73}{space 3} .6563886
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} .4596617{col 32}{space 2} .2571229{col 43}{space 1}    1.79{col 52}{space 3}0.076{col 60}{space 4}-.0484446{col 73}{space 3}  .967768
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2}-.8000046{col 32}{space 2} .5077752{col 43}{space 1}   -1.58{col 52}{space 3}0.117{col 60}{space 4}-1.803431{col 73}{space 3} .2034214
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .3290795{col 32}{space 2} .2567758{col 43}{space 1}    1.28{col 52}{space 3}0.202{col 60}{space 4}-.1783408{col 73}{space 3} .8364998
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .2237815{col 32}{space 2} .2590678{col 43}{space 1}    0.86{col 52}{space 3}0.389{col 60}{space 4}-.2881683{col 73}{space 3} .7357313
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2}-.0126874{col 32}{space 2} .3460289{col 43}{space 1}   -0.04{col 52}{space 3}0.971{col 60}{space 4}-.6964829{col 73}{space 3} .6711082
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .3515481{col 32}{space 2} .2622364{col 43}{space 1}    1.34{col 52}{space 3}0.182{col 60}{space 4}-.1666632{col 73}{space 3} .8697594
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .3102816{col 32}{space 2} .3196217{col 43}{space 1}    0.97{col 52}{space 3}0.333{col 60}{space 4}-.3213301{col 73}{space 3} .9418933
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .3350445{col 32}{space 2}  .283307{col 43}{space 1}    1.18{col 52}{space 3}0.239{col 60}{space 4}-.2248049{col 73}{space 3} .8948939
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2} -.508573{col 32}{space 2} .5345794{col 43}{space 1}   -0.95{col 52}{space 3}0.343{col 60}{space 4}-1.564967{col 73}{space 3} .5478215
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2}  .390408{col 32}{space 2} .4415643{col 43}{space 1}    0.88{col 52}{space 3}0.378{col 60}{space 4}-.4821772{col 73}{space 3} 1.262993
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2} .0771327{col 32}{space 2} .2753344{col 43}{space 1}    0.28{col 52}{space 3}0.780{col 60}{space 4}-.4669617{col 73}{space 3} .6212271
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2}-.1290608{col 32}{space 2} .4742717{col 43}{space 1}   -0.27{col 52}{space 3}0.786{col 60}{space 4} -1.06628{col 73}{space 3} .8081582
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2}-.7228089{col 32}{space 2}   .44445{col 43}{space 1}   -1.63{col 52}{space 3}0.106{col 60}{space 4}-1.601097{col 73}{space 3} .1554788
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .6193409{col 32}{space 2} .2835403{col 43}{space 1}    2.18{col 52}{space 3}0.031{col 60}{space 4} .0590304{col 73}{space 3} 1.179651
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2} .0377785{col 32}{space 2} .2522252{col 43}{space 1}    0.15{col 52}{space 3}0.881{col 60}{space 4}-.4606493{col 73}{space 3} .5362063
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         
.                         preserve
{txt}
{com}.                         keep if std_avg_mscore~=.
{txt}(3,567 observations deleted)

{com}.                         unique schoolid  /* 178, schools 5510 students */
{txt}Number of unique values of schoolid is  {res}178
{txt}Number of records is  {res}5510
{txt}
{com}.                         sort schoolid
{txt}
{com}.                         by schoolid:keep if _n==1
{txt}(5,332 observations deleted)

{com}.                         count /* 178 */
  {res}178
{txt}
{com}.                         svy: reg std_avg_mscore treat district#stratum  /* no sig diff at school level */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       30{txt}{col 49}Number of obs{col 67}= {res}       178
{txt}{col 1}Number of PSUs{col 20}= {res}      178{txt}{col 49}Population size{col 67}={res} 1,090.6468
{txt}{col 49}Design df{col 67}= {res}       148
{txt}{col 49}F({res}  30{txt},{res}    119{txt}){col 67}= {res}      1.40
{txt}{col 49}Prob > F{col 67}= {res}    0.1054
{txt}{col 49}R-squared{col 67}= {res}    0.2309

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}    std_avg_mscore{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2} .0086295{col 32}{space 2} .1457892{col 43}{space 1}    0.06{col 52}{space 3}0.953{col 60}{space 4}-.2794679{col 73}{space 3} .2967269
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .5326817{col 32}{space 2} .3096074{col 43}{space 1}    1.72{col 52}{space 3}0.087{col 60}{space 4}-.0791405{col 73}{space 3} 1.144504
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .1364508{col 32}{space 2} .3042401{col 43}{space 1}    0.45{col 52}{space 3}0.654{col 60}{space 4} -.464765{col 73}{space 3} .7376665
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .1185417{col 32}{space 2} .3838398{col 43}{space 1}    0.31{col 52}{space 3}0.758{col 60}{space 4}-.6399728{col 73}{space 3} .8770562
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} -.179101{col 32}{space 2} .3311971{col 43}{space 1}   -0.54{col 52}{space 3}0.589{col 60}{space 4}-.8335871{col 73}{space 3} .4753851
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .5041394{col 32}{space 2} .4747656{col 43}{space 1}    1.06{col 52}{space 3}0.290{col 60}{space 4}-.4340555{col 73}{space 3} 1.442334
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2}-.0103319{col 32}{space 2} .4169409{col 43}{space 1}   -0.02{col 52}{space 3}0.980{col 60}{space 4}-.8342581{col 73}{space 3} .8135943
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .0866869{col 32}{space 2} .3747778{col 43}{space 1}    0.23{col 52}{space 3}0.817{col 60}{space 4}  -.65392{col 73}{space 3} .8272937
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2}-.8206864{col 32}{space 2}  .876453{col 43}{space 1}   -0.94{col 52}{space 3}0.351{col 60}{space 4}-2.552665{col 73}{space 3} .9112921
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .3819832{col 32}{space 2} .3138525{col 43}{space 1}    1.22{col 52}{space 3}0.226{col 60}{space 4}-.2382279{col 73}{space 3} 1.002194
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .2915058{col 32}{space 2} .3487851{col 43}{space 1}    0.84{col 52}{space 3}0.405{col 60}{space 4}-.3977362{col 73}{space 3} .9807478
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2}  .327776{col 32}{space 2} .6422749{col 43}{space 1}    0.51{col 52}{space 3}0.611{col 60}{space 4}-.9414378{col 73}{space 3}  1.59699
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2}-.0222974{col 32}{space 2} .3889007{col 43}{space 1}   -0.06{col 52}{space 3}0.954{col 60}{space 4}-.7908129{col 73}{space 3}  .746218
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .3046743{col 32}{space 2} .4967206{col 43}{space 1}    0.61{col 52}{space 3}0.541{col 60}{space 4}-.6769064{col 73}{space 3} 1.286255
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} .6772893{col 32}{space 2}  .272328{col 43}{space 1}    2.49{col 52}{space 3}0.014{col 60}{space 4} .1391357{col 73}{space 3} 1.215443
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2}  .272529{col 32}{space 2} .3134884{col 43}{space 1}    0.87{col 52}{space 3}0.386{col 60}{space 4}-.3469625{col 73}{space 3} .8920205
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} .6120481{col 32}{space 2} .2761671{col 43}{space 1}    2.22{col 52}{space 3}0.028{col 60}{space 4}  .066308{col 73}{space 3} 1.157788
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2}-.5062008{col 32}{space 2} .6069781{col 43}{space 1}   -0.83{col 52}{space 3}0.406{col 60}{space 4}-1.705664{col 73}{space 3} .6932622
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .5241944{col 32}{space 2} .2742886{col 43}{space 1}    1.91{col 52}{space 3}0.058{col 60}{space 4}-.0178334{col 73}{space 3} 1.066222
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .4508159{col 32}{space 2} .2912069{col 43}{space 1}    1.55{col 52}{space 3}0.124{col 60}{space 4}-.1246446{col 73}{space 3} 1.026276
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .2251638{col 32}{space 2} .3865575{col 43}{space 1}    0.58{col 52}{space 3}0.561{col 60}{space 4}-.5387212{col 73}{space 3} .9890489
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .6085057{col 32}{space 2} .3087201{col 43}{space 1}    1.97{col 52}{space 3}0.051{col 60}{space 4}-.0015631{col 73}{space 3} 1.218574
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .3744256{col 32}{space 2} .3789403{col 43}{space 1}    0.99{col 52}{space 3}0.325{col 60}{space 4}-.3744068{col 73}{space 3} 1.123258
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .6061499{col 32}{space 2}  .305648{col 43}{space 1}    1.98{col 52}{space 3}0.049{col 60}{space 4}  .002152{col 73}{space 3} 1.210148
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.1011357{col 32}{space 2} .4348373{col 43}{space 1}   -0.23{col 52}{space 3}0.816{col 60}{space 4}-.9604275{col 73}{space 3}  .758156
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2}  .170189{col 32}{space 2} .4445937{col 43}{space 1}    0.38{col 52}{space 3}0.702{col 60}{space 4}-.7083825{col 73}{space 3} 1.048761
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2} .3702618{col 32}{space 2} .2880412{col 43}{space 1}    1.29{col 52}{space 3}0.201{col 60}{space 4}-.1989428{col 73}{space 3} .9394665
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2}-.0986814{col 32}{space 2} .5517619{col 43}{space 1}   -0.18{col 52}{space 3}0.858{col 60}{space 4}-1.189031{col 73}{space 3} .9916677
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} -.689678{col 32}{space 2} .4427013{col 43}{space 1}   -1.56{col 52}{space 3}0.121{col 60}{space 4} -1.56451{col 73}{space 3} .1851541
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2}  .604851{col 32}{space 2} .3948343{col 43}{space 1}    1.53{col 52}{space 3}0.128{col 60}{space 4}-.1753899{col 73}{space 3} 1.385092
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.1157256{col 32}{space 2} .2637276{col 43}{space 1}   -0.44{col 52}{space 3}0.661{col 60}{space 4}-.6368836{col 73}{space 3} .4054324
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         restore
{txt}
{com}.                                                                         
.                         *  prep interaction
.                         gen treatxmscore=treat*std_avg_mscore   
{txt}(3,567 missing values generated)

{com}.                         
.                         * ITT estimation
.                         
.                         svy: reg stdIRTmatgr10 treat std_avg_mscore treatxmscore Asnt_aft Math_1st district#stratum     /* 5510 obs */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       30{txt}{col 49}Number of obs{col 67}= {res}     5,510
{txt}{col 1}Number of PSUs{col 20}= {res}      178{txt}{col 49}Population size{col 67}={res} 33,589.472
{txt}{col 49}Design df{col 67}= {res}       148
{txt}{col 49}F({res}  34{txt},{res}    115{txt}){col 67}= {res}      9.40
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.2531

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}     stdIRTmatgr10{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2}-.0534459{col 32}{space 2} .0739791{col 43}{space 1}   -0.72{col 52}{space 3}0.471{col 60}{space 4}-.1996377{col 73}{space 3} .0927459
{txt}{space 4}std_avg_mscore {c |}{col 20}{res}{space 2} .0566367{col 32}{space 2} .0503556{col 43}{space 1}    1.12{col 52}{space 3}0.263{col 60}{space 4}-.0428721{col 73}{space 3} .1561455
{txt}{space 6}treatxmscore {c |}{col 20}{res}{space 2}-.0787127{col 32}{space 2} .0831199{col 43}{space 1}   -0.95{col 52}{space 3}0.345{col 60}{space 4}-.2429678{col 73}{space 3} .0855424
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2}-.0528041{col 32}{space 2} .0800764{col 43}{space 1}   -0.66{col 52}{space 3}0.511{col 60}{space 4}-.2110449{col 73}{space 3} .1054366
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} .0859824{col 32}{space 2} .0752529{col 43}{space 1}    1.14{col 52}{space 3}0.255{col 60}{space 4}-.0627265{col 73}{space 3} .2346912
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} 1.399585{col 32}{space 2} .7342543{col 43}{space 1}    1.91{col 52}{space 3}0.059{col 60}{space 4}-.0513911{col 73}{space 3} 2.850562
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .4564632{col 32}{space 2}  .190174{col 43}{space 1}    2.40{col 52}{space 3}0.018{col 60}{space 4}  .080656{col 73}{space 3} .8322703
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .2864904{col 32}{space 2} .1819786{col 43}{space 1}    1.57{col 52}{space 3}0.118{col 60}{space 4}-.0731216{col 73}{space 3} .6461025
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} 1.108743{col 32}{space 2} .2371327{col 43}{space 1}    4.68{col 52}{space 3}0.000{col 60}{space 4} .6401396{col 73}{space 3} 1.577346
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .5603984{col 32}{space 2} .1708581{col 43}{space 1}    3.28{col 52}{space 3}0.001{col 60}{space 4} .2227617{col 73}{space 3}  .898035
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .3078201{col 32}{space 2} .2575791{col 43}{space 1}    1.20{col 52}{space 3}0.234{col 60}{space 4}-.2011878{col 73}{space 3} .8168279
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2}  .690995{col 32}{space 2} .1581463{col 43}{space 1}    4.37{col 52}{space 3}0.000{col 60}{space 4} .3784785{col 73}{space 3} 1.003511
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} 1.071399{col 32}{space 2} .2231363{col 43}{space 1}    4.80{col 52}{space 3}0.000{col 60}{space 4} .6304546{col 73}{space 3} 1.512344
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .6459516{col 32}{space 2} .2600807{col 43}{space 1}    2.48{col 52}{space 3}0.014{col 60}{space 4} .1320003{col 73}{space 3} 1.159903
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .7742817{col 32}{space 2} .1403855{col 43}{space 1}    5.52{col 52}{space 3}0.000{col 60}{space 4} .4968626{col 73}{space 3} 1.051701
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.895281{col 32}{space 2} .1580105{col 43}{space 1}   11.99{col 52}{space 3}0.000{col 60}{space 4} 1.583033{col 73}{space 3} 2.207529
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .7889914{col 32}{space 2} .1446859{col 43}{space 1}    5.45{col 52}{space 3}0.000{col 60}{space 4} .5030744{col 73}{space 3} 1.074908
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .9499031{col 32}{space 2} .1833461{col 43}{space 1}    5.18{col 52}{space 3}0.000{col 60}{space 4} .5875887{col 73}{space 3} 1.312218
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} 1.582981{col 32}{space 2} .1867932{col 43}{space 1}    8.47{col 52}{space 3}0.000{col 60}{space 4} 1.213855{col 73}{space 3} 1.952107
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} 1.436127{col 32}{space 2}   .36872{col 43}{space 1}    3.89{col 52}{space 3}0.000{col 60}{space 4} .7074915{col 73}{space 3} 2.164763
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} 1.466404{col 32}{space 2} .2616251{col 43}{space 1}    5.60{col 52}{space 3}0.000{col 60}{space 4}  .949401{col 73}{space 3} 1.983407
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} 1.225769{col 32}{space 2} .3453685{col 43}{space 1}    3.55{col 52}{space 3}0.001{col 60}{space 4} .5432784{col 73}{space 3} 1.908259
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .9541873{col 32}{space 2} .2055591{col 43}{space 1}    4.64{col 52}{space 3}0.000{col 60}{space 4} .5479774{col 73}{space 3} 1.360397
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} 1.287812{col 32}{space 2}  .183324{col 43}{space 1}    7.02{col 52}{space 3}0.000{col 60}{space 4} .9255412{col 73}{space 3} 1.650083
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .7934959{col 32}{space 2} .2427962{col 43}{space 1}    3.27{col 52}{space 3}0.001{col 60}{space 4}  .313701{col 73}{space 3} 1.273291
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .6163925{col 32}{space 2} .2770311{col 43}{space 1}    2.22{col 52}{space 3}0.028{col 60}{space 4} .0689451{col 73}{space 3}  1.16384
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .8828865{col 32}{space 2} .1552497{col 43}{space 1}    5.69{col 52}{space 3}0.000{col 60}{space 4}  .576094{col 73}{space 3} 1.189679
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .9865202{col 32}{space 2}  .303747{col 43}{space 1}    3.25{col 52}{space 3}0.001{col 60}{space 4}  .386279{col 73}{space 3} 1.586762
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.1596036{col 32}{space 2} .1853779{col 43}{space 1}   -0.86{col 52}{space 3}0.391{col 60}{space 4}-.5259332{col 73}{space 3} .2067259
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .7537598{col 32}{space 2} .1403221{col 43}{space 1}    5.37{col 52}{space 3}0.000{col 60}{space 4} .4764662{col 73}{space 3} 1.031053
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.2128533{col 32}{space 2} .1558542{col 43}{space 1}   -1.37{col 52}{space 3}0.174{col 60}{space 4}-.5208403{col 73}{space 3} .0951337
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} .4805279{col 32}{space 2} .1489423{col 43}{space 1}    3.23{col 52}{space 3}0.002{col 60}{space 4} .1861996{col 73}{space 3} .7748561
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .4217248{col 32}{space 2} .2118752{col 43}{space 1}    1.99{col 52}{space 3}0.048{col 60}{space 4} .0030334{col 73}{space 3} .8404161
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2}  .880642{col 32}{space 2} .2283864{col 43}{space 1}    3.86{col 52}{space 3}0.000{col 60}{space 4} .4293225{col 73}{space 3} 1.331962
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.6901988{col 32}{space 2} .1309655{col 43}{space 1}   -5.27{col 52}{space 3}0.000{col 60}{space 4}-.9490027{col 73}{space 3}-.4313949
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         /* negative but not significant interaction */
.                         
.                                 
.                         test treat treatxmscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}treat = 0{p_end}
{p 0 7}{space 1}{text:( 2)}{space 1} treatxmscore = 0{p_end}

{txt}       F(  2,   147) ={res}    0.63
{txt}{col 13}Prob > F ={res}    0.5332
{txt}
{com}.                         test treatxmscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}treatxmscore = 0{p_end}

{txt}       F(  1,   148) ={res}    0.90
{txt}{col 13}Prob > F ={res}    0.3452
{txt}
{com}.                         lincom treat + treatxmscore  /* for teachers 1 std dev above average of teacher test score, training has quite a significant negative impact  (probably should adjust standard errors for preliminary estimation of average score) */

{p 0 7}{space 1}{text:( 1)}{space 1} {res}treat + treatxmscore = 0{p_end}

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}stdIRTmat~10{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}(1) {c |}{col 14}{res}{space 2}-.1321586{col 26}{space 2} .1177659{col 37}{space 1}   -1.12{col 46}{space 3}0.264{col 54}{space 4}-.3648785{col 67}{space 3} .1005612
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         
.                         * check what un-interacted treatment looks like on this smaller sample
.                         svy:reg stdIRTmatgr10 treat Asnt_aft Math_1st district#stratum if treatxmscore~=.
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       30{txt}{col 49}Number of obs{col 67}= {res}     5,510
{txt}{col 1}Number of PSUs{col 20}= {res}      178{txt}{col 49}Population size{col 67}={res} 33,589.472
{txt}{col 49}Design df{col 67}= {res}       148
{txt}{col 49}F({res}  32{txt},{res}    117{txt}){col 67}= {res}      9.99
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.2521

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}     stdIRTmatgr10{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2}-.0542094{col 32}{space 2} .0736821{col 43}{space 1}   -0.74{col 52}{space 3}0.463{col 60}{space 4}-.1998143{col 73}{space 3} .0913954
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2}-.0492774{col 32}{space 2} .0800067{col 43}{space 1}   -0.62{col 52}{space 3}0.539{col 60}{space 4}-.2073803{col 73}{space 3} .1088256
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} .0872832{col 32}{space 2} .0746582{col 43}{space 1}    1.17{col 52}{space 3}0.244{col 60}{space 4}-.0602505{col 73}{space 3} .2348169
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} 1.401195{col 32}{space 2} .7460703{col 43}{space 1}    1.88{col 52}{space 3}0.062{col 60}{space 4}-.0731316{col 73}{space 3} 2.875521
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .4557759{col 32}{space 2} .1967847{col 43}{space 1}    2.32{col 52}{space 3}0.022{col 60}{space 4} .0669052{col 73}{space 3} .8446466
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .2966893{col 32}{space 2} .1798822{col 43}{space 1}    1.65{col 52}{space 3}0.101{col 60}{space 4}  -.05878{col 73}{space 3} .6521586
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} 1.100273{col 32}{space 2} .2383213{col 43}{space 1}    4.62{col 52}{space 3}0.000{col 60}{space 4} .6293209{col 73}{space 3} 1.571225
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .5680556{col 32}{space 2} .1591887{col 43}{space 1}    3.57{col 52}{space 3}0.000{col 60}{space 4} .2534792{col 73}{space 3}  .882632
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .3167312{col 32}{space 2} .2599739{col 43}{space 1}    1.22{col 52}{space 3}0.225{col 60}{space 4}-.1970091{col 73}{space 3} .8304715
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .6925177{col 32}{space 2} .1654827{col 43}{space 1}    4.18{col 52}{space 3}0.000{col 60}{space 4} .3655036{col 73}{space 3} 1.019532
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} 1.020577{col 32}{space 2} .2030149{col 43}{space 1}    5.03{col 52}{space 3}0.000{col 60}{space 4} .6193949{col 73}{space 3} 1.421759
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .6520971{col 32}{space 2} .2467283{col 43}{space 1}    2.64{col 52}{space 3}0.009{col 60}{space 4} .1645319{col 73}{space 3} 1.139662
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .7653834{col 32}{space 2} .1414774{col 43}{space 1}    5.41{col 52}{space 3}0.000{col 60}{space 4} .4858068{col 73}{space 3}  1.04496
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.928793{col 32}{space 2} .1546509{col 43}{space 1}   12.47{col 52}{space 3}0.000{col 60}{space 4} 1.623184{col 73}{space 3} 2.234402
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .7578976{col 32}{space 2} .1395174{col 43}{space 1}    5.43{col 52}{space 3}0.000{col 60}{space 4} .4821941{col 73}{space 3} 1.033601
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .9650282{col 32}{space 2} .1836406{col 43}{space 1}    5.25{col 52}{space 3}0.000{col 60}{space 4} .6021319{col 73}{space 3} 1.327925
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} 1.588608{col 32}{space 2} .1883365{col 43}{space 1}    8.43{col 52}{space 3}0.000{col 60}{space 4} 1.216432{col 73}{space 3} 1.960784
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2}  1.42281{col 32}{space 2} .3689457{col 43}{space 1}    3.86{col 52}{space 3}0.000{col 60}{space 4} .6937278{col 73}{space 3} 2.151891
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2}  1.47317{col 32}{space 2} .2561831{col 43}{space 1}    5.75{col 52}{space 3}0.000{col 60}{space 4} .9669209{col 73}{space 3} 1.979419
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} 1.219188{col 32}{space 2} .3271852{col 43}{space 1}    3.73{col 52}{space 3}0.000{col 60}{space 4} .5726302{col 73}{space 3} 1.865746
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .9633383{col 32}{space 2}  .202191{col 43}{space 1}    4.76{col 52}{space 3}0.000{col 60}{space 4} .5637841{col 73}{space 3} 1.362892
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} 1.286141{col 32}{space 2} .1808319{col 43}{space 1}    7.11{col 52}{space 3}0.000{col 60}{space 4}  .928795{col 73}{space 3} 1.643487
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .8042314{col 32}{space 2} .2390093{col 43}{space 1}    3.36{col 52}{space 3}0.001{col 60}{space 4} .3319197{col 73}{space 3} 1.276543
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .6315128{col 32}{space 2} .2829597{col 43}{space 1}    2.23{col 52}{space 3}0.027{col 60}{space 4} .0723499{col 73}{space 3} 1.190676
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .8789552{col 32}{space 2} .1492256{col 43}{space 1}    5.89{col 52}{space 3}0.000{col 60}{space 4} .5840672{col 73}{space 3} 1.173843
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .9941303{col 32}{space 2} .3099069{col 43}{space 1}    3.21{col 52}{space 3}0.002{col 60}{space 4} .3817163{col 73}{space 3} 1.606544
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.1817906{col 32}{space 2}  .189187{col 43}{space 1}   -0.96{col 52}{space 3}0.338{col 60}{space 4}-.5556472{col 73}{space 3} .1920661
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .7745605{col 32}{space 2} .1352735{col 43}{space 1}    5.73{col 52}{space 3}0.000{col 60}{space 4} .5072436{col 73}{space 3} 1.041877
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2} -.213206{col 32}{space 2} .1544794{col 43}{space 1}   -1.38{col 52}{space 3}0.170{col 60}{space 4}-.5184762{col 73}{space 3} .0920642
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} .4690204{col 32}{space 2} .1504157{col 43}{space 1}    3.12{col 52}{space 3}0.002{col 60}{space 4} .1717806{col 73}{space 3} .7662602
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .3806626{col 32}{space 2} .1997126{col 43}{space 1}    1.91{col 52}{space 3}0.059{col 60}{space 4} -.013994{col 73}{space 3} .7753193
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .9086172{col 32}{space 2} .2283099{col 43}{space 1}    3.98{col 52}{space 3}0.000{col 60}{space 4} .4574488{col 73}{space 3} 1.359786
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.6883733{col 32}{space 2} .1306946{col 43}{space 1}   -5.27{col 52}{space 3}0.000{col 60}{space 4}-.9466419{col 73}{space 3}-.4301047
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         svy:reg stdIRTmatgr10 treat Asnt_aft Math_1st district#stratum  /* sample change doesn't make a big difference */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       30{txt}{col 49}Number of obs{col 67}= {res}     5,833
{txt}{col 1}Number of PSUs{col 20}= {res}      189{txt}{col 49}Population size{col 67}={res} 35,586.058
{txt}{col 49}Design df{col 67}= {res}       159
{txt}{col 49}F({res}  32{txt},{res}    128{txt}){col 67}= {res}     10.52
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.2523

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}     stdIRTmatgr10{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2}-.0441864{col 32}{space 2} .0722092{col 43}{space 1}   -0.61{col 52}{space 3}0.541{col 60}{space 4}-.1867992{col 73}{space 3} .0984265
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2}-.0512387{col 32}{space 2} .0753817{col 43}{space 1}   -0.68{col 52}{space 3}0.498{col 60}{space 4}-.2001172{col 73}{space 3} .0976399
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} .0732446{col 32}{space 2} .0706042{col 43}{space 1}    1.04{col 52}{space 3}0.301{col 60}{space 4}-.0661985{col 73}{space 3} .2126876
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} 1.074225{col 32}{space 2} .6793098{col 43}{space 1}    1.58{col 52}{space 3}0.116{col 60}{space 4} -.267409{col 73}{space 3} 2.415859
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .3326908{col 32}{space 2} .2243475{col 43}{space 1}    1.48{col 52}{space 3}0.140{col 60}{space 4}-.1103948{col 73}{space 3} .7757763
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .1769506{col 32}{space 2} .2105961{col 43}{space 1}    0.84{col 52}{space 3}0.402{col 60}{space 4} -.238976{col 73}{space 3} .5928771
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .9802216{col 32}{space 2} .2515297{col 43}{space 1}    3.90{col 52}{space 3}0.000{col 60}{space 4} .4834513{col 73}{space 3} 1.476992
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .4405885{col 32}{space 2} .1903994{col 43}{space 1}    2.31{col 52}{space 3}0.022{col 60}{space 4} .0645503{col 73}{space 3} .8166266
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .1493609{col 32}{space 2} .2731941{col 43}{space 1}    0.55{col 52}{space 3}0.585{col 60}{space 4}-.3901964{col 73}{space 3} .6889182
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .5671798{col 32}{space 2}  .197635{col 43}{space 1}    2.87{col 52}{space 3}0.005{col 60}{space 4} .1768513{col 73}{space 3} .9575082
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .8926846{col 32}{space 2} .2293926{col 43}{space 1}    3.89{col 52}{space 3}0.000{col 60}{space 4}  .439635{col 73}{space 3} 1.345734
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .5324143{col 32}{space 2} .2733749{col 43}{space 1}    1.95{col 52}{space 3}0.053{col 60}{space 4}-.0075001{col 73}{space 3} 1.072329
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .6390231{col 32}{space 2} .1788158{col 43}{space 1}    3.57{col 52}{space 3}0.000{col 60}{space 4} .2858625{col 73}{space 3} .9921836
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.809551{col 32}{space 2} .1873293{col 43}{space 1}    9.66{col 52}{space 3}0.000{col 60}{space 4} 1.439576{col 73}{space 3} 2.179526
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .6364097{col 32}{space 2} .1759075{col 43}{space 1}    3.62{col 52}{space 3}0.000{col 60}{space 4} .2889931{col 73}{space 3} .9838263
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .8423643{col 32}{space 2} .2152004{col 43}{space 1}    3.91{col 52}{space 3}0.000{col 60}{space 4} .4173444{col 73}{space 3} 1.267384
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2}  1.46786{col 32}{space 2} .2185459{col 43}{space 1}    6.72{col 52}{space 3}0.000{col 60}{space 4} 1.036233{col 73}{space 3} 1.899488
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} 1.291332{col 32}{space 2}  .378193{col 43}{space 1}    3.41{col 52}{space 3}0.001{col 60}{space 4} .5444023{col 73}{space 3} 2.038262
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} 1.348389{col 32}{space 2} .2765014{col 43}{space 1}    4.88{col 52}{space 3}0.000{col 60}{space 4} .8022994{col 73}{space 3} 1.894478
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} .9833401{col 32}{space 2} .2652861{col 43}{space 1}    3.71{col 52}{space 3}0.000{col 60}{space 4}  .459401{col 73}{space 3} 1.507279
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .8379901{col 32}{space 2} .2126716{col 43}{space 1}    3.94{col 52}{space 3}0.000{col 60}{space 4} .4179646{col 73}{space 3} 1.258016
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} 1.166292{col 32}{space 2} .2118313{col 43}{space 1}    5.51{col 52}{space 3}0.000{col 60}{space 4} .7479264{col 73}{space 3} 1.584658
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .6800505{col 32}{space 2} .2616757{col 43}{space 1}    2.60{col 52}{space 3}0.010{col 60}{space 4}  .163242{col 73}{space 3} 1.196859
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2}   .44641{col 32}{space 2} .2541349{col 43}{space 1}    1.76{col 52}{space 3}0.081{col 60}{space 4}-.0555056{col 73}{space 3} .9483255
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .7982463{col 32}{space 2} .1810154{col 43}{space 1}    4.41{col 52}{space 3}0.000{col 60}{space 4} .4407415{col 73}{space 3} 1.155751
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .8691214{col 32}{space 2} .3309216{col 43}{space 1}    2.63{col 52}{space 3}0.009{col 60}{space 4} .2155525{col 73}{space 3}  1.52269
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.3172686{col 32}{space 2} .1889857{col 43}{space 1}   -1.68{col 52}{space 3}0.095{col 60}{space 4}-.6905147{col 73}{space 3} .0559774
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .6486973{col 32}{space 2} .1728953{col 43}{space 1}    3.75{col 52}{space 3}0.000{col 60}{space 4} .3072298{col 73}{space 3} .9901648
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.3343056{col 32}{space 2} .1874571{col 43}{space 1}   -1.78{col 52}{space 3}0.076{col 60}{space 4}-.7045327{col 73}{space 3} .0359215
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} .3342796{col 32}{space 2} .1834521{col 43}{space 1}    1.82{col 52}{space 3}0.070{col 60}{space 4}-.0280375{col 73}{space 3} .6965967
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .1777487{col 32}{space 2} .2353992{col 43}{space 1}    0.76{col 52}{space 3}0.451{col 60}{space 4}-.2871639{col 73}{space 3} .6426612
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .7822134{col 32}{space 2} .2513628{col 43}{space 1}    3.11{col 52}{space 3}0.002{col 60}{space 4} .2857729{col 73}{space 3} 1.278654
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.5610631{col 32}{space 2} .1672826{col 43}{space 1}   -3.35{col 52}{space 3}0.001{col 60}{space 4}-.8914455{col 73}{space 3}-.2306807
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         
.                         * Set up for LATE 
.                         
.                         * Generate dummy variable for LATE regressions: teacher actually trained in 2 types of training
.                         gen tchrtreat_m=ssdp_m_t*treat
{txt}(3,971 missing values generated)

{com}.                                                 
.                         summ tchrtreat_m treat std_avg_mscore

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}tchrtreat_m {c |}{res}      5,106    .2853506    .4495605          0          1
{txt}{space 7}treat {c |}{res}      5,833    .4613406     .498546          0          1
{txt}std_avg_ms~e {c |}{res}      5,510    .1068965    .7181861  -4.015192   .7950177
{txt}
{com}.                         count if tchrtreat_m~=. & std_avg_mscore~=.    /* 4908 */
  {res}4,908
{txt}
{com}.                                                                                                 
.                         * LATE regression without interaction  but with the standardized teacher math score as a regressor  
.                         
.                         svy: ivregress 2sls stdIRTmatgr10 Asnt_aft Math_1st std_avg_mscore district#stratum  (tchrtreat_m = treat) /*This fails becauseo of stratum with single sampling unit.*/
{res}{txt}(running {bf:ivregress} on estimation sample)
{res}
{txt}Survey: Instrumental variables (2SLS) regression

{col 1}Number of strata{col 20}= {res}       30{txt}{col 49}Number of obs{col 67}= {res}     4,908
{txt}{col 1}Number of PSUs{col 20}= {res}      162{txt}{col 49}Population size{col 67}={res} 29,114.163
{txt}{col 49}Design df{col 67}= {res}       132
{txt}{col 49}{help j_robustsingular##|_new:F(   0,    132)}{col 67}=          {res}.
{txt}{col 49}Prob > F{col 67}=          {res}.
{txt}{col 49}R-squared{col 67}= {res}    0.2615

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}     stdIRTmatgr10{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}tchrtreat_m {c |}{col 20}{res}{space 2}-.1290063{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2}-.0909755{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} .0224244{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 4}std_avg_mscore {c |}{col 20}{res}{space 2} .0159103{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} 1.715422{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .3879309{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .1458994{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2}  1.08598{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .5435225{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .2916975{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .6482803{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .9829299{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .6159961{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .7811569{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.871366{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .7340929{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .9031733{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} 1.529012{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} .8439386{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} 1.412321{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} 1.081605{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .7571672{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} 1.102855{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .7693491{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .2917432{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .7925452{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .8779269{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.2038804{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .6542554{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2} -.243587{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} .3951473{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .3111602{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .8342678{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.5631813{col 32}{space 2}        .{col 43}{space 1}       .{col 52}{space 3}    .{col 60}{space 4}        .{col 73}{space 3}        .
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 15 31}Instrumented:{space 2}tchrtreat_m{p_end}
{p 0 15 31}Instruments:{space 3}Asnt_aft Math_1st std_avg_mscore 2b.district#2.stratum 5.district#1b.stratum 5.district#2.stratum 11.district#1b.stratum 11.district#2.stratum 20.district#1b.stratum 20.district#2.stratum 24.district#1b.stratum 24.district#2.stratum 28.district#1b.stratum 28.district#2.stratum 34.district#1b.stratum 34.district#2.stratum 35.district#1b.stratum 35.district#2.stratum 37.district#1b.stratum 37.district#2.stratum 45.district#1b.stratum 45.district#2.stratum 50.district#1b.stratum 50.district#2.stratum 51.district#1b.stratum 51.district#2.stratum 55.district#1b.stratum 55.district#2.stratum 60.district#1b.stratum 60.district#2.stratum 69.district#1b.stratum 69.district#2.stratum treat{p_end}
{hline 84}
{p 0 6 0 79}Note: Missing standard errors because of stratum with single sampling unit.{txt}{p_end}

{com}.                         
.                         * finding bad dist_stratum
.                         preserve
{txt}
{com}.                         drop if std_avg_mscore==. | tchrtreat_m==. | stdIRTmatgr10==.
{txt}(4,169 observations deleted)

{com}.                         count
  {res}4,908
{txt}
{com}.                         unique schoolid  /* 162 schools, 4908 students */
{txt}Number of unique values of schoolid is  {res}162
{txt}Number of records is  {res}4908
{txt}
{com}.                                                 
.                         sort schoolid 
{txt}
{com}.                         by schoolid:  gen first=_n==1
{txt}
{com}.                         keep if first==1
{txt}(4,746 observations deleted)

{com}.                         tab dist_stratum  /* looks like dist_stratum=372 is a problem */

{txt}dist_stratu {c |}
          m {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
         21 {c |}{res}          5        3.09        3.09
{txt}         22 {c |}{res}          2        1.23        4.32
{txt}         51 {c |}{res}         16        9.88       14.20
{txt}         52 {c |}{res}          8        4.94       19.14
{txt}        111 {c |}{res}          6        3.70       22.84
{txt}        112 {c |}{res}          3        1.85       24.69
{txt}        201 {c |}{res}          7        4.32       29.01
{txt}        202 {c |}{res}          3        1.85       30.86
{txt}        241 {c |}{res}          7        4.32       35.19
{txt}        242 {c |}{res}          4        2.47       37.65
{txt}        281 {c |}{res}          6        3.70       41.36
{txt}        282 {c |}{res}          4        2.47       43.83
{txt}        341 {c |}{res}          8        4.94       48.77
{txt}        342 {c |}{res}          4        2.47       51.23
{txt}        351 {c |}{res}          8        4.94       56.17
{txt}        352 {c |}{res}          3        1.85       58.02
{txt}        371 {c |}{res}          8        4.94       62.96
{txt}        372 {c |}{res}          1        0.62       63.58
{txt}        451 {c |}{res}          6        3.70       67.28
{txt}        452 {c |}{res}          2        1.23       68.52
{txt}        501 {c |}{res}          7        4.32       72.84
{txt}        502 {c |}{res}          2        1.23       74.07
{txt}        511 {c |}{res}          6        3.70       77.78
{txt}        512 {c |}{res}          3        1.85       79.63
{txt}        551 {c |}{res}          6        3.70       83.33
{txt}        552 {c |}{res}          4        2.47       85.80
{txt}        601 {c |}{res}          8        4.94       90.74
{txt}        602 {c |}{res}          4        2.47       93.21
{txt}        691 {c |}{res}          7        4.32       97.53
{txt}        692 {c |}{res}          4        2.47      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        162      100.00
{txt}
{com}.                         restore
{txt}
{com}.                                                                 
.                         * remove bad dist_stratum
.                         drop if dist_stratum==372
{txt}(89 observations deleted)

{com}.                                 
.                         * LATE with math teacher score as regressor, but no interaction. after dropping dist_stratum==372
.                         svy: ivregress 2sls stdIRTmatgr10 Asnt_aft Math_1st std_avg_mscore district#stratum  (tchrtreat_m = treat)
{res}{txt}(running {bf:ivregress} on estimation sample)
{res}
{txt}Survey: Instrumental variables (2SLS) regression

{col 1}Number of strata{col 20}= {res}       29{txt}{col 49}Number of obs{col 67}= {res}     4,900
{txt}{col 1}Number of PSUs{col 20}= {res}      161{txt}{col 49}Population size{col 67}={res} 29,060.972
{txt}{col 49}Design df{col 67}= {res}       132
{txt}{col 49}F({res}  32{txt},{res}    101{txt}){col 67}= {res}     10.24
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.2617

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}     stdIRTmatgr10{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}tchrtreat_m {c |}{col 20}{res}{space 2}-.1290063{col 32}{space 2} .1028205{col 43}{space 1}   -1.25{col 52}{space 3}0.212{col 60}{space 4}-.3323954{col 73}{space 3} .0743828
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2}-.0909755{col 32}{space 2} .0734768{col 43}{space 1}   -1.24{col 52}{space 3}0.218{col 60}{space 4}-.2363199{col 73}{space 3} .0543689
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} .0224244{col 32}{space 2} .0674358{col 43}{space 1}    0.33{col 52}{space 3}0.740{col 60}{space 4}-.1109703{col 73}{space 3} .1558192
{txt}{space 4}std_avg_mscore {c |}{col 20}{res}{space 2} .0159103{col 32}{space 2} .0494303{col 43}{space 1}    0.32{col 52}{space 3}0.748{col 60}{space 4}-.0818677{col 73}{space 3} .1136883
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} 1.715422{col 32}{space 2} 1.142128{col 43}{space 1}    1.50{col 52}{space 3}0.135{col 60}{space 4}-.5438198{col 73}{space 3} 3.974664
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .3879309{col 32}{space 2} .1950309{col 43}{space 1}    1.99{col 52}{space 3}0.049{col 60}{space 4} .0021405{col 73}{space 3} .7737212
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .1458994{col 32}{space 2} .1725835{col 43}{space 1}    0.85{col 52}{space 3}0.399{col 60}{space 4}-.1954877{col 73}{space 3} .4872866
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2}  1.08598{col 32}{space 2} .2930232{col 43}{space 1}    3.71{col 52}{space 3}0.000{col 60}{space 4} .5063514{col 73}{space 3} 1.665609
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .5435225{col 32}{space 2} .1716573{col 43}{space 1}    3.17{col 52}{space 3}0.002{col 60}{space 4} .2039675{col 73}{space 3} .8830775
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .2916975{col 32}{space 2} .2530873{col 43}{space 1}    1.15{col 52}{space 3}0.251{col 60}{space 4}-.2089341{col 73}{space 3} .7923291
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .6482803{col 32}{space 2} .2050937{col 43}{space 1}    3.16{col 52}{space 3}0.002{col 60}{space 4} .2425848{col 73}{space 3} 1.053976
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .9829299{col 32}{space 2}  .231841{col 43}{space 1}    4.24{col 52}{space 3}0.000{col 60}{space 4} .5243254{col 73}{space 3} 1.441534
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .6159961{col 32}{space 2} .2647071{col 43}{space 1}    2.33{col 52}{space 3}0.021{col 60}{space 4} .0923793{col 73}{space 3} 1.139613
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .7811569{col 32}{space 2} .1629917{col 43}{space 1}    4.79{col 52}{space 3}0.000{col 60}{space 4} .4587433{col 73}{space 3} 1.103571
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.871366{col 32}{space 2} .1548549{col 43}{space 1}   12.08{col 52}{space 3}0.000{col 60}{space 4} 1.565047{col 73}{space 3} 2.177684
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .7340929{col 32}{space 2} .1397793{col 43}{space 1}    5.25{col 52}{space 3}0.000{col 60}{space 4} .4575957{col 73}{space 3}  1.01059
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .9031733{col 32}{space 2} .1835684{col 43}{space 1}    4.92{col 52}{space 3}0.000{col 60}{space 4}  .540057{col 73}{space 3}  1.26629
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} 1.529012{col 32}{space 2} .1838471{col 43}{space 1}    8.32{col 52}{space 3}0.000{col 60}{space 4} 1.165344{col 73}{space 3}  1.89268
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} .8439386{col 32}{space 2} .1797725{col 43}{space 1}    4.69{col 52}{space 3}0.000{col 60}{space 4} .4883309{col 73}{space 3} 1.199546
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} 1.412321{col 32}{space 2} .2514006{col 43}{space 1}    5.62{col 52}{space 3}0.000{col 60}{space 4} .9150258{col 73}{space 3} 1.909616
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2}        0{col 32}{txt}  (empty)
{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .7571672{col 32}{space 2} .1507467{col 43}{space 1}    5.02{col 52}{space 3}0.000{col 60}{space 4} .4589753{col 73}{space 3} 1.055359
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} 1.102855{col 32}{space 2} .2218829{col 43}{space 1}    4.97{col 52}{space 3}0.000{col 60}{space 4} .6639488{col 73}{space 3} 1.541762
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .7693491{col 32}{space 2} .2523359{col 43}{space 1}    3.05{col 52}{space 3}0.003{col 60}{space 4} .2702039{col 73}{space 3} 1.268494
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .2917432{col 32}{space 2} .1555912{col 43}{space 1}    1.88{col 52}{space 3}0.063{col 60}{space 4}-.0160316{col 73}{space 3}  .599518
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .7925452{col 32}{space 2} .1674577{col 43}{space 1}    4.73{col 52}{space 3}0.000{col 60}{space 4} .4612973{col 73}{space 3} 1.123793
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .8779269{col 32}{space 2} .3702656{col 43}{space 1}    2.37{col 52}{space 3}0.019{col 60}{space 4}  .145505{col 73}{space 3} 1.610349
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.2038804{col 32}{space 2} .2098743{col 43}{space 1}   -0.97{col 52}{space 3}0.333{col 60}{space 4}-.6190325{col 73}{space 3} .2112717
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .6542554{col 32}{space 2} .1536564{col 43}{space 1}    4.26{col 52}{space 3}0.000{col 60}{space 4} .3503078{col 73}{space 3} .9582029
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2} -.243587{col 32}{space 2} .1478797{col 43}{space 1}   -1.65{col 52}{space 3}0.102{col 60}{space 4}-.5361077{col 73}{space 3} .0489336
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} .3951473{col 32}{space 2} .1506016{col 43}{space 1}    2.62{col 52}{space 3}0.010{col 60}{space 4} .0972424{col 73}{space 3} .6930521
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .3111602{col 32}{space 2} .2125808{col 43}{space 1}    1.46{col 52}{space 3}0.146{col 60}{space 4}-.1093457{col 73}{space 3} .7316661
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .8342678{col 32}{space 2} .3151732{col 43}{space 1}    2.65{col 52}{space 3}0.009{col 60}{space 4} .2108241{col 73}{space 3} 1.457711
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.5631813{col 32}{space 2} .1337958{col 43}{space 1}   -4.21{col 52}{space 3}0.000{col 60}{space 4}-.8278426{col 73}{space 3}  -.29852
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 15 31}Instrumented:{space 2}tchrtreat_m{p_end}
{p 0 15 31}Instruments:{space 3}Asnt_aft Math_1st std_avg_mscore 2b.district#2.stratum 5.district#1b.stratum 5.district#2.stratum 11.district#1b.stratum 11.district#2.stratum 20.district#1b.stratum 20.district#2.stratum 24.district#1b.stratum 24.district#2.stratum 28.district#1b.stratum 28.district#2.stratum 34.district#1b.stratum 34.district#2.stratum 35.district#1b.stratum 35.district#2.stratum 37.district#1b.stratum 45.district#1b.stratum 45.district#2.stratum 50.district#1b.stratum 50.district#2.stratum 51.district#1b.stratum 51.district#2.stratum 55.district#1b.stratum 55.district#2.stratum 60.district#1b.stratum 60.district#2.stratum 69.district#1b.stratum 69.district#2.stratum treat{p_end}
{hline 84}

{com}.                                         
.                         
.                         * LATE regression with interaction
.                         gen tchrtreatxmscore = tchrtreat_m*std_avg_mscore
{txt}(4,088 missing values generated)

{com}.                         svy: ivregress 2sls stdIRTmatgr10 Asnt_aft Math_1st std_avg_mscore district#stratum (tchrtreat_m tchrtreatxmscore = treat treatxmscore)
{res}{txt}(running {bf:ivregress} on estimation sample)
{res}
{txt}Survey: Instrumental variables (2SLS) regression

{col 1}Number of strata{col 20}= {res}       29{txt}{col 49}Number of obs{col 67}= {res}     4,900
{txt}{col 1}Number of PSUs{col 20}= {res}      161{txt}{col 49}Population size{col 67}={res} 29,060.972
{txt}{col 49}Design df{col 67}= {res}       132
{txt}{col 49}F({res}  33{txt},{res}    100{txt}){col 67}= {res}      9.67
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.2501

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}     stdIRTmatgr10{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}tchrtreat_m {c |}{col 20}{res}{space 2}-.0575132{col 32}{space 2} .1387124{col 43}{space 1}   -0.41{col 52}{space 3}0.679{col 60}{space 4}   -.3319{col 73}{space 3} .2168736
{txt}{space 2}tchrtreatxmscore {c |}{col 20}{res}{space 2}-.3397101{col 32}{space 2} .3009153{col 43}{space 1}   -1.13{col 52}{space 3}0.261{col 60}{space 4}-.9349503{col 73}{space 3} .2555302
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2}-.1023123{col 32}{space 2} .0836284{col 43}{space 1}   -1.22{col 52}{space 3}0.223{col 60}{space 4}-.2677377{col 73}{space 3}  .063113
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} .0009635{col 32}{space 2} .0709163{col 43}{space 1}    0.01{col 52}{space 3}0.989{col 60}{space 4} -.139316{col 73}{space 3} .1412429
{txt}{space 4}std_avg_mscore {c |}{col 20}{res}{space 2} .0571353{col 32}{space 2} .0519395{col 43}{space 1}    1.10{col 52}{space 3}0.273{col 60}{space 4}-.0456063{col 73}{space 3} .1598768
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} 1.680389{col 32}{space 2} 1.148138{col 43}{space 1}    1.46{col 52}{space 3}0.146{col 60}{space 4}-.5907407{col 73}{space 3} 3.951519
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .3838604{col 32}{space 2} .2003472{col 43}{space 1}    1.92{col 52}{space 3}0.058{col 60}{space 4}-.0124462{col 73}{space 3} .7801669
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .1380878{col 32}{space 2} .1872217{col 43}{space 1}    0.74{col 52}{space 3}0.462{col 60}{space 4}-.2322553{col 73}{space 3} .5084309
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} 1.002719{col 32}{space 2} .3049399{col 43}{space 1}    3.29{col 52}{space 3}0.001{col 60}{space 4} .3995182{col 73}{space 3} 1.605921
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .4856132{col 32}{space 2} .2236121{col 43}{space 1}    2.17{col 52}{space 3}0.032{col 60}{space 4} .0432864{col 73}{space 3} .9279401
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .2416848{col 32}{space 2} .2797494{col 43}{space 1}    0.86{col 52}{space 3}0.389{col 60}{space 4}-.3116872{col 73}{space 3} .7950567
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .6167394{col 32}{space 2} .2043974{col 43}{space 1}    3.02{col 52}{space 3}0.003{col 60}{space 4} .2124212{col 73}{space 3} 1.021058
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} 1.010622{col 32}{space 2} .2335868{col 43}{space 1}    4.33{col 52}{space 3}0.000{col 60}{space 4} .5485647{col 73}{space 3}  1.47268
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .5868264{col 32}{space 2}  .283201{col 43}{space 1}    2.07{col 52}{space 3}0.040{col 60}{space 4} .0266269{col 73}{space 3} 1.147026
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2}  .750558{col 32}{space 2} .1801714{col 43}{space 1}    4.17{col 52}{space 3}0.000{col 60}{space 4} .3941612{col 73}{space 3} 1.106955
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.862891{col 32}{space 2} .1618467{col 43}{space 1}   11.51{col 52}{space 3}0.000{col 60}{space 4} 1.542742{col 73}{space 3}  2.18304
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2}  .763206{col 32}{space 2} .1620474{col 43}{space 1}    4.71{col 52}{space 3}0.000{col 60}{space 4} .4426603{col 73}{space 3} 1.083752
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .9199354{col 32}{space 2} .1739761{col 43}{space 1}    5.29{col 52}{space 3}0.000{col 60}{space 4} .5757934{col 73}{space 3} 1.264077
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} 1.535721{col 32}{space 2} .1771925{col 43}{space 1}    8.67{col 52}{space 3}0.000{col 60}{space 4} 1.185217{col 73}{space 3} 1.886225
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2}   .80972{col 32}{space 2} .1736142{col 43}{space 1}    4.66{col 52}{space 3}0.000{col 60}{space 4} .4662939{col 73}{space 3} 1.153146
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2}  1.42503{col 32}{space 2}  .257951{col 43}{space 1}    5.52{col 52}{space 3}0.000{col 60}{space 4} .9147769{col 73}{space 3} 1.935282
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2}        0{col 32}{txt}  (empty)
{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .7134114{col 32}{space 2} .1506599{col 43}{space 1}    4.74{col 52}{space 3}0.000{col 60}{space 4} .4153913{col 73}{space 3} 1.011432
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} 1.079338{col 32}{space 2} .2357919{col 43}{space 1}    4.58{col 52}{space 3}0.000{col 60}{space 4} .6129188{col 73}{space 3} 1.545758
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .7434961{col 32}{space 2} .2550229{col 43}{space 1}    2.92{col 52}{space 3}0.004{col 60}{space 4} .2390355{col 73}{space 3} 1.247957
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2}  .257452{col 32}{space 2} .1644969{col 43}{space 1}    1.57{col 52}{space 3}0.120{col 60}{space 4}-.0679391{col 73}{space 3} .5828432
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .7540075{col 32}{space 2} .1741736{col 43}{space 1}    4.33{col 52}{space 3}0.000{col 60}{space 4} .4094749{col 73}{space 3}  1.09854
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .8343518{col 32}{space 2}  .373033{col 43}{space 1}    2.24{col 52}{space 3}0.027{col 60}{space 4} .0964556{col 73}{space 3} 1.572248
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.2538735{col 32}{space 2} .2158693{col 43}{space 1}   -1.18{col 52}{space 3}0.242{col 60}{space 4}-.6808842{col 73}{space 3} .1731372
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .6005027{col 32}{space 2} .1702879{col 43}{space 1}    3.53{col 52}{space 3}0.001{col 60}{space 4} .2636564{col 73}{space 3}  .937349
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.2717483{col 32}{space 2} .1518331{col 43}{space 1}   -1.79{col 52}{space 3}0.076{col 60}{space 4}-.5720891{col 73}{space 3} .0285926
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2}     .326{col 32}{space 2} .1983345{col 43}{space 1}    1.64{col 52}{space 3}0.103{col 60}{space 4}-.0663252{col 73}{space 3} .7183252
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .3330066{col 32}{space 2} .2201395{col 43}{space 1}    1.51{col 52}{space 3}0.133{col 60}{space 4}-.1024511{col 73}{space 3} .7684644
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .7686621{col 32}{space 2} .3210701{col 43}{space 1}    2.39{col 52}{space 3}0.018{col 60}{space 4} .1335536{col 73}{space 3} 1.403771
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.5230961{col 32}{space 2} .1445299{col 43}{space 1}   -3.62{col 52}{space 3}0.000{col 60}{space 4}-.8089905{col 73}{space 3}-.2372016
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 15 31}Instrumented:{space 2}tchrtreat_m tchrtreatxmscore{p_end}
{p 0 15 31}Instruments:{space 3}Asnt_aft Math_1st std_avg_mscore 2b.district#2.stratum 5.district#1b.stratum 5.district#2.stratum 11.district#1b.stratum 11.district#2.stratum 20.district#1b.stratum 20.district#2.stratum 24.district#1b.stratum 24.district#2.stratum 28.district#1b.stratum 28.district#2.stratum 34.district#1b.stratum 34.district#2.stratum 35.district#1b.stratum 35.district#2.stratum 37.district#1b.stratum 45.district#1b.stratum 45.district#2.stratum 50.district#1b.stratum 50.district#2.stratum 51.district#1b.stratum 51.district#2.stratum 55.district#1b.stratum 55.district#2.stratum 60.district#1b.stratum 60.district#2.stratum 69.district#1b.stratum 69.district#2.stratum treat treatxmscore{p_end}
{hline 84}

{com}.                                                 
.                         test tchrtreat_m tchrtreatxmscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreat_m = 0{p_end}
{p 0 7}{space 1}{text:( 2)}{space 1} tchrtreatxmscore = 0{p_end}

{txt}       F(  2,   131) ={res}    1.80
{txt}{col 13}Prob > F ={res}    0.1696
{txt}
{com}.                         test tchrtreatxmscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreatxmscore = 0{p_end}

{txt}       F(  1,   132) ={res}    1.27
{txt}{col 13}Prob > F ={res}    0.2610
{txt}
{com}.                         lincom tchrtreat_m + tchrtreatxmscore  /* impact for schools with avg math teacher score 1 std deviation above the control mean */

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreat_m + tchrtreatxmscore = 0{p_end}

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}stdIRTmat~10{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}(1) {c |}{col 14}{res}{space 2}-.3972232{col 26}{space 2} .2344473{col 37}{space 1}   -1.69{col 46}{space 3}0.093{col 54}{space 4}-.8609832{col 67}{space 3} .0665367
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         lincom tchrtreat_m - tchrtreatxmscore

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreat_m - tchrtreatxmscore = 0{p_end}

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}stdIRTmat~10{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}(1) {c |}{col 14}{res}{space 2} .2821969{col 26}{space 2} .4057299{col 37}{space 1}    0.70{col 46}{space 3}0.488{col 54}{space 4}-.5203771{col 67}{space 3} 1.084771
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         
. 
.                         
.         ****************************************************************************
.         ****GRADE 10, SCIENCE
.         ****************************************************************************
.         
.         use "`e_sci_10'", clear
{txt}(Endline student-level Science assessment dataset, Grade 10, Tests A & B)

{com}.                 
.         egen RawSci10=rowtotal(Sci_*)
{txt}
{com}.         
.         *Calculate raw score on below grade items (grade 8 or lower)
.         egen sci10_EZ=rowtotal(Sci_004 Sci_006 Sci_009 Sci_022 Sci_025 Sci_032 ///
>                                                    Sci_037 Sci_038 Sci_039 Sci_041 Sci_042 Sci_056)
{txt}
{com}.                                                    
.         gen s10pct_EZ=sci10_EZ/6 if test=="Science" /* This is Science 10A */
{txt}(2,883 missing values generated)

{com}.         replace s10pct_EZ=sci10_EZ/8 if test=="Science10B"
{txt}(2,883 real changes made)

{com}.         
.         drop Sci_*
{txt}
{com}.         sort schoolid
{txt}
{com}.         
.         merge m:1 schoolid using "`sch_temp'" 
{res}
{txt}{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}              14
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}              14{txt}  (_merge==2)

{col 5}matched{col 30}{res}           5,833{txt}  (_merge==3)
{col 5}{hline 41}

{com}.         //14 unmatched (14 using)
.         list distname study schoolid if _m~=3 /*12 from Jumla, 1 each Panchthar, Kavre*/
{txt}
      {c TLC}{hline 12}{c -}{hline 18}{c -}{hline 10}{c TRC}
      {c |} {res}  distname           studyarm   schoolid {txt}{c |}
      {c LT}{hline 12}{c -}{hline 18}{c -}{hline 10}{c RT}
5834. {c |} {res} Panchthar            Control    1411217 {txt}{c |}
5835. {c |} {res}Kavrepalan            Control   16842045 {txt}{c |}
5836. {c |} {res}     Jumla            Control   44100717 {txt}{c |}
5837. {c |} {res}     Jumla      Training Only   44102138 {txt}{c |}
5838. {c |} {res}     Jumla   Training with VA   44107024 {txt}{c |}
      {c LT}{hline 12}{c -}{hline 18}{c -}{hline 10}{c RT}
5839. {c |} {res}     Jumla            Control   44111224 {txt}{c |}
5840. {c |} {res}     Jumla      Training Only   44114010 {txt}{c |}
5841. {c |} {res}     Jumla            Control   44114710 {txt}{c |}
5842. {c |} {res}     Jumla            Control   44116810 {txt}{c |}
5843. {c |} {res}     Jumla      Training Only   44117524 {txt}{c |}
      {c LT}{hline 12}{c -}{hline 18}{c -}{hline 10}{c RT}
5844. {c |} {res}     Jumla            Control   44118231 {txt}{c |}
5845. {c |} {res}     Jumla            Control   44119624 {txt}{c |}
5846. {c |} {res}     Jumla   Training with VA   44120310 {txt}{c |}
5847. {c |} {res}     Jumla   Training with VA   44121024 {txt}{c |}
      {c BLC}{hline 12}{c -}{hline 18}{c -}{hline 10}{c BRC}

{com}.         drop if _m~=3 //14
{txt}(14 observations deleted)

{com}.         count if stu_serial=="" //2
  {res}2
{txt}
{com}.         drop if stu_serial=="" //2
{txt}(2 observations deleted)

{com}.         drop _m
{txt}
{com}.         sort stu_serial
{txt}
{com}.         sort stu_serial
{txt}
{com}.         gen dup=(stu_serial==stu_serial[_n-1])
{txt}
{com}.         tab dup /* Two observations with same non-missing stu_serial, this is the 2nd */

        {txt}dup {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          0 {c |}{res}      5,830       99.98       99.98
{txt}          1 {c |}{res}          1        0.02      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}      5,831      100.00
{txt}
{com}.         l stu_serial if dup==1
{txt}
      {c TLC}{hline 10}{c TRC}
      {c |} {res}stu_se~l {txt}{c |}
      {c LT}{hline 10}{c RT}
5572. {c |} {res} G9N1371 {txt}{c |}
      {c BLC}{hline 10}{c BRC}

{com}.         su if stu_serial=="G9N1371" /* 2 distinct observations, drop both of them */

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}district {c |}{res}          2        57.5    3.535534         55         60
{txt}{space 4}schoolid {c |}{res}          2    4.03e+07     2470404   3.85e+07   4.20e+07
{txt}{space 2}stu_serial {c |}{res}          0
{txt}{space 8}test {c |}{res}          0
{txt}{space 2}theta_gr10 {c |}{res}          2   -.5358369    .4615366  -.8621925  -.2094813
{txt}{hline 13}{c +}{hline 57}
theta_gr10~P {c |}{res}          2   -.2784192    .8324845  -.8670746   .3102363
{txt}{space 4}RawSci10 {c |}{res}          2        12.5    3.535534         10         15
{txt}{space 4}sci10_EZ {c |}{res}          2           4           0          4          4
{txt}{space 3}s10pct_EZ {c |}{res}          2          .5           0         .5         .5
{txt}{space 4}Asnt_aft {c |}{res}          2           0           0          0          0
{txt}{hline 13}{c +}{hline 57}
{space 4}Math_1st {c |}{res}          2          .5    .7071068          0          1
{txt}{space 4}distname {c |}{res}          0
{txt}{space 5}stratum {c |}{res}          2         1.5    .7071068          1          2
{txt}{space 4}studyarm {c |}{res}          2         2.5    .7071068          2          3
{txt}{space 4}sch_wght {c |}{res}          2    6.488015    1.233394   5.615874   7.360157
{txt}{hline 13}{c +}{hline 57}
dist_stratum {c |}{res}          2       576.5    36.06245        551        602
{txt}{space 10}TT {c |}{res}          2           0           0          0          0
{txt}{space 8}TTVA {c |}{res}          2          .5    .7071068          0          1
{txt}{space 7}treat {c |}{res}          2          .5    .7071068          0          1
{txt}{space 1}hourstoroad {c |}{res}          2    5.708333    3.830162          3   8.416667
{txt}{hline 13}{c +}{hline 57}
{space 2}theta_mgmt {c |}{res}          2    .0439037    .7998896  -.5217037   .6095111
{txt}{space 2}totalscore {c |}{res}          2          17    4.242641         14         20
{txt}{space 4}goodmgmt {c |}{res}          2          .5    .7071068          0          1
{txt}{space 2}avg_mscore {c |}{res}          2        8.75    1.767767        7.5         10
{txt}std_avg_ms~e {c |}{res}          2   -.5578539    1.062916  -1.309449   .1937414
{txt}{hline 13}{c +}{hline 57}
{space 2}avg_sscore {c |}{res}          2          10           0         10         10
{txt}std_avg_ss~e {c |}{res}          2    .7733872           0   .7733872   .7733872
{txt}{space 9}dup {c |}{res}          2          .5    .7071068          0          1
{txt}
{com}.         drop if stu_serial=="G9N1371" //2
{txt}(2 observations deleted)

{com}.         
.         *Merge with grade 10 students 
.         merge 1:1 stu_serial using Grade10_c
{res}{txt}{p 0 7 2}
(note: variable
stu_serial was 
str33, now str39 to accommodate using data's values)
{p_end}
(label yn already defined)

{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}           3,247
{txt}{col 9}from master{col 30}{res}               0{txt}  (_merge==1)
{col 9}from using{col 30}{res}           3,247{txt}  (_merge==2)

{col 5}matched{col 30}{res}           5,829{txt}  (_merge==3)
{col 5}{hline 41}

{com}.         //3247 unmatched (3247 using)
.         drop _m
{txt}
{com}.         
.         *Merge with grade 10 students science teachers
.         merge 1:1 stu_serial using "`g10scitc'"
{res}
{txt}{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}           3,477
{txt}{col 9}from master{col 30}{res}           3,477{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}matched{col 30}{res}           5,599{txt}  (_merge==3)
{col 5}{hline 41}

{com}.         //3477 unmatched (3477 master)
.         drop if _m==2 //0
{txt}(0 observations deleted)

{com}.         drop _m
{txt}
{com}.         
.         * Normalize grade 10 science IRT score, 1st for all items then for SSDP-focus items
.         svy, over(treat): mean theta_gr10 
{res}{txt}(running {bf:mean} on estimation sample)
{res}
{txt}Survey: Mean estimation

{col 1}Number of strata{col 18}= {res}     30{txt}{col 41}Number of obs{col 57}= {res}     5,829
{txt}{col 1}Number of PSUs{col 18}= {res}    189{txt}{col 41}Population size{col 57}={res} 35,567.352
{txt}{col 41}Design df{col 57}= {res}       159

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 20}{c |}       Mean{col 32}   Std. Err.{col 44}     [95% Con{col 57}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
c.theta_gr10@treat {c |}
{space 16}0  {c |}{col 20}{res}{space 2} .0002491{col 32}{space 2} .0624891{col 43}{space 5}-.1231667{col 57}{space 3} .1236649
{txt}{space 16}1  {c |}{col 20}{res}{space 2}-.0013395{col 32}{space 2} .0706172{col 43}{space 5}-.1408082{col 57}{space 3} .1381291
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}.         mat b = e(b)
{txt}
{com}.         gen mean = b[1,1]
{txt}
{com}.         estat sd

{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{col 1}{text}        Over{col 14}{c |}       Mean{col 27}  Std. Dev.
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{space 10}c. {c |}
{space 2}theta_gr10@{c |}
{space 7}treat {c |}
{space 10}0  {c |}{col 14}{result}{space 2} .0002491{col 27}{space 2} .8907537
{txt}{space 10}1  {c |}{col 14}{result}{space 2}-.0013395{col 27}{space 2} .8649483
{col 1}{text}{hline 13}{c BT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{res}{txt}
{com}.         mat sd = r(sd)
{txt}
{com}.         gen sd = sd[1,1]
{txt}
{com}.         gen stdIRTscigr10=(theta_gr10-mean)/sd
{txt}(3,247 missing values generated)

{com}.         drop mean sd
{txt}
{com}. 
.         svy, over(treat): mean theta_gr10_SSDP 
{res}{txt}(running {bf:mean} on estimation sample)
{res}
{txt}Survey: Mean estimation

{col 1}Number of strata{col 18}= {res}     30{txt}{col 46}Number of obs{col 62}= {res}     5,829
{txt}{col 1}Number of PSUs{col 18}= {res}    189{txt}{col 46}Population size{col 62}={res} 35,567.352
{txt}{col 46}Design df{col 62}= {res}       159

{txt}{hline 24}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 25}{c |}{col 37}  Linearized
{col 25}{c |}       Mean{col 37}   Std. Err.{col 49}     [95% Con{col 62}f. Interval]
{hline 24}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
c.theta_gr10_SSDP@treat {c |}
{space 21}0  {c |}{col 25}{res}{space 2}-.0057538{col 37}{space 2} .0533019{col 48}{space 5}-.1110249{col 62}{space 3} .0995172
{txt}{space 21}1  {c |}{col 25}{res}{space 2} .0019719{col 37}{space 2} .0609314{col 48}{space 5}-.1183674{col 62}{space 3} .1223112
{txt}{hline 24}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}.         mat b = e(b)
{txt}
{com}.         gen mean = b[1,1]
{txt}
{com}.         estat sd

{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{col 1}{text}        Over{col 14}{c |}       Mean{col 27}  Std. Dev.
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{space 10}c. {c |}
theta_gr10~P@{c |}
{space 7}treat {c |}
{space 10}0  {c |}{col 14}{result}{space 2}-.0057538{col 27}{space 2} .8250144
{txt}{space 10}1  {c |}{col 14}{result}{space 2} .0019719{col 27}{space 2}   .80792
{col 1}{text}{hline 13}{c BT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{res}{txt}
{com}.         mat sd = r(sd)
{txt}
{com}.         gen sd = sd[1,1]
{txt}
{com}.         gen stdIRTscigr10_SSDP=(theta_gr10_SSDP-mean)/sd
{txt}(3,247 missing values generated)

{com}.         drop mean sd
{txt}
{com}. 
.         svy, over(treat): mean RawSci10 
{res}{txt}(running {bf:mean} on estimation sample)
{res}
{txt}Survey: Mean estimation

{col 1}Number of strata{col 18}= {res}     30{txt}{col 39}Number of obs{col 55}= {res}     5,829
{txt}{col 1}Number of PSUs{col 18}= {res}    189{txt}{col 39}Population size{col 55}={res} 35,567.352
{txt}{col 39}Design df{col 55}= {res}       159

{txt}{hline 17}{c TT}{hline 11}{hline 11}{hline 14}{hline 12}
{col 18}{c |}{col 30}  Linearized
{col 18}{c |}       Mean{col 30}   Std. Err.{col 42}     [95% Con{col 55}f. Interval]
{hline 17}{c +}{hline 11}{hline 11}{hline 14}{hline 12}
c.RawSci10@treat {c |}
{space 14}0  {c |}{col 18}{res}{space 2}  17.3562{col 30}{space 2} .3616835{col 41}{space 5} 16.64187{col 55}{space 3} 18.07052
{txt}{space 14}1  {c |}{col 18}{res}{space 2} 17.48324{col 30}{space 2} .3957265{col 41}{space 5} 16.70168{col 55}{space 3}  18.2648
{txt}{hline 17}{c BT}{hline 11}{hline 11}{hline 14}{hline 12}

{com}.         mat b = e(b)
{txt}
{com}.         gen mean = b[1,1]
{txt}
{com}.         estat sd

{res}{col 1}{text}{hline 13}{c TT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{col 1}{text}        Over{col 14}{c |}       Mean{col 27}  Std. Dev.
{res}{col 1}{text}{hline 13}{c +}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{space 2}c.RawSci10@{c |}
{space 7}treat {c |}
{space 10}0  {c |}{col 14}{result}{space 2}  17.3562{col 27}{space 2} 5.175828
{txt}{space 10}1  {c |}{col 14}{result}{space 2} 17.48324{col 27}{space 2} 5.050479
{col 1}{text}{hline 13}{c BT}{hline 12}{hline 11}{hline 0}{hline 0}{hline 0}{hline 0}
{res}{txt}
{com}.         mat sd = r(sd)
{txt}
{com}.         gen sd = sd[1,1]
{txt}
{com}.         gen stdRawSci10=(mean-RawSci10)/sd
{txt}(3,247 missing values generated)

{com}.         drop mean sd
{txt}
{com}. 
.         * Add control variables, only for latent skill values that include all items
.         * For wealth I generate IRT, dropping phone (see balance test file for reason)
.         gen dadseced=(f_educlevel>=2 & f_educlevel<=5)
{txt}
{com}.         gen momseced=(m_educlevel>=2 & m_educlevel<=5)
{txt}
{com}.         foreach var in fam_tv fam_bicycle fam_scooter fam_refrigerator fam_computer {c -(}
{txt}  2{com}.           replace `var'=. if `var'==9
{txt}  3{com}.           replace `var'=0 if `var'==2 /* change "no" from 2 to 0, 1 is "yes" */
{txt}  4{com}.           {c )-}
{txt}(119 real changes made, 119 to missing)
(2,218 real changes made)
(166 real changes made, 166 to missing)
(3,250 real changes made)
(283 real changes made, 283 to missing)
(4,356 real changes made)
(273 real changes made, 273 to missing)
(4,485 real changes made)
(329 real changes made, 329 to missing)
(4,730 real changes made)

{com}.         irt 2pl fam_tv fam_bicycle fam_scooter fam_refrigerator fam_computer
{res}{txt}
Fitting fixed-effects model:

Iteration 0:{space 3}log likelihood = {res:-15553.008}  
Iteration 1:{space 3}log likelihood = {res:-15538.238}  
Iteration 2:{space 3}log likelihood = {res:-15538.233}  
Iteration 3:{space 3}log likelihood = {res:-15538.233}  

Fitting full model:
{res}
{txt}Iteration 0:{space 3}log likelihood = {res:-14380.163}  
Iteration 1:{space 3}log likelihood = {res:-14025.367}  
Iteration 2:{space 3}log likelihood = {res:-13985.362}  
Iteration 3:{space 3}log likelihood = {res:-13984.796}  
Iteration 4:{space 3}log likelihood = {res:-13984.795}  
{res}
{txt}Two-parameter logistic model{col 49}Number of obs{col 67}= {res}     5,774
{txt}Log likelihood = {res}-13984.795
{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_tv       {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 2.027463{col 26}{space 2} .1062553{col 37}{space 1}   19.08{col 46}{space 3}0.000{col 54}{space 4} 1.819206{col 67}{space 3} 2.235719
{txt}{space 8}Diff {c |}{col 14}{res}{space 2}-.3766669{col 26}{space 2} .0236068{col 37}{space 1}  -15.96{col 46}{space 3}0.000{col 54}{space 4}-.4229353{col 67}{space 3}-.3303985
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_bicycle  {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 1.229094{col 26}{space 2} .0566663{col 37}{space 1}   21.69{col 46}{space 3}0.000{col 54}{space 4}  1.11803{col 67}{space 3} 1.340158
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} .3000852{col 26}{space 2} .0296312{col 37}{space 1}   10.13{col 46}{space 3}0.000{col 54}{space 4} .2420091{col 67}{space 3} .3581613
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_scooter  {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 2.244363{col 26}{space 2} .1226376{col 37}{space 1}   18.30{col 46}{space 3}0.000{col 54}{space 4} 2.003998{col 67}{space 3} 2.484729
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} .9599425{col 26}{space 2} .0316703{col 37}{space 1}   30.31{col 46}{space 3}0.000{col 54}{space 4}   .89787{col 67}{space 3} 1.022015
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_refrig~r {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 2.318938{col 26}{space 2} .1275379{col 37}{space 1}   18.18{col 46}{space 3}0.000{col 54}{space 4} 2.068968{col 67}{space 3} 2.568908
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} 1.049128{col 26}{space 2} .0327878{col 37}{space 1}   32.00{col 46}{space 3}0.000{col 54}{space 4} .9848653{col 67}{space 3} 1.113391
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}fam_computer {txt}{c |}
{space 5}Discrim {c |}{col 14}{res}{space 2} 1.605933{col 26}{space 2} .0852369{col 37}{space 1}   18.84{col 46}{space 3}0.000{col 54}{space 4} 1.438872{col 67}{space 3} 1.772994
{txt}{space 8}Diff {c |}{col 14}{res}{space 2} 1.532065{col 26}{space 2} .0554118{col 37}{space 1}   27.65{col 46}{space 3}0.000{col 54}{space 4}  1.42346{col 67}{space 3}  1.64067
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict assetindex, latent
{txt}(option {bf:ebmeans} assumed)
{res}{txt}(using 7 quadrature points)

{com}.         *Set 61 observations = . if no data on assets for them
.         replace assetindex=. if fam_tv==. & fam_bicycle==. & fam_scooter==. ///
>                                                         & fam_refrigerator==. & fam_computer==.
{txt}(3,302 real changes made, 3,302 to missing)

{com}.         tempfile analysis_g10s
{txt}
{com}.         save "`analysis_g10s'", replace
{txt}(note: file C:\Users\jschaf01\AppData\Local\Temp\ST_8e50_00000p.tmp not found)
file C:\Users\jschaf01\AppData\Local\Temp\ST_8e50_00000p.tmp saved

{com}.                 
.         
. * Grade 9 science, full endline sample, impact estimation (including het WRT avg sci teacher score)
. 
.                         use "`analysis_g10s'", clear
{txt}(Endline student-level Science assessment dataset, Grade 10, Tests A & B)

{com}.                         unique schoolid if avg_sscore~=. /* 175 schools, 5467 schools */
{txt}Number of unique values of schoolid is  {res}175
{txt}Number of records is  {res}5467
{txt}
{com}.                         
.                 * how does the avg sci teacher assessment score differ between treatment and control?
.                         svy: reg std_avg_sscore treat Asnt_aft Math_1st district#stratum        /* not much diff */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       30{txt}{col 49}Number of obs{col 67}= {res}     5,467
{txt}{col 1}Number of PSUs{col 20}= {res}      175{txt}{col 49}Population size{col 67}={res} 33,345.141
{txt}{col 49}Design df{col 67}= {res}       145
{txt}{col 49}F({res}  32{txt},{res}    114{txt}){col 67}= {res}      3.14
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.3868

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}    std_avg_sscore{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2}-.0415268{col 32}{space 2} .1119206{col 43}{space 1}   -0.37{col 52}{space 3}0.711{col 60}{space 4}-.2627332{col 73}{space 3} .1796797
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .2101142{col 32}{space 2} .1253106{col 43}{space 1}    1.68{col 52}{space 3}0.096{col 60}{space 4}-.0375571{col 73}{space 3} .4577855
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} .1111067{col 32}{space 2} .1174064{col 43}{space 1}    0.95{col 52}{space 3}0.346{col 60}{space 4}-.1209424{col 73}{space 3} .3431558
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} 1.311296{col 32}{space 2} .6794447{col 43}{space 1}    1.93{col 52}{space 3}0.056{col 60}{space 4}-.0315992{col 73}{space 3} 2.654191
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2}  .547353{col 32}{space 2} .7892812{col 43}{space 1}    0.69{col 52}{space 3}0.489{col 60}{space 4}-1.012629{col 73}{space 3} 2.107335
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} 1.302489{col 32}{space 2} .6669624{col 43}{space 1}    1.95{col 52}{space 3}0.053{col 60}{space 4}-.0157353{col 73}{space 3} 2.620713
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} 1.143696{col 32}{space 2}  .673301{col 43}{space 1}    1.70{col 52}{space 3}0.092{col 60}{space 4}-.1870558{col 73}{space 3} 2.474449
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .5295769{col 32}{space 2} .7017996{col 43}{space 1}    0.75{col 52}{space 3}0.452{col 60}{space 4}-.8575017{col 73}{space 3} 1.916656
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .6687631{col 32}{space 2} .6600245{col 43}{space 1}    1.01{col 52}{space 3}0.313{col 60}{space 4}-.6357486{col 73}{space 3} 1.973275
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .5855827{col 32}{space 2} .8077298{col 43}{space 1}    0.72{col 52}{space 3}0.470{col 60}{space 4}-1.010863{col 73}{space 3} 2.182028
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} 1.508149{col 32}{space 2} .6976205{col 43}{space 1}    2.16{col 52}{space 3}0.032{col 60}{space 4} .1293308{col 73}{space 3} 2.886968
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2}-1.057668{col 32}{space 2} 1.530972{col 43}{space 1}   -0.69{col 52}{space 3}0.491{col 60}{space 4}-4.083571{col 73}{space 3} 1.968236
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} 1.238524{col 32}{space 2} .6333625{col 43}{space 1}    1.96{col 52}{space 3}0.052{col 60}{space 4}-.0132911{col 73}{space 3}  2.49034
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} .5085154{col 32}{space 2} 1.556402{col 43}{space 1}    0.33{col 52}{space 3}0.744{col 60}{space 4}-2.567651{col 73}{space 3} 3.584682
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} 1.361086{col 32}{space 2} .6619312{col 43}{space 1}    2.06{col 52}{space 3}0.042{col 60}{space 4}  .052806{col 73}{space 3} 2.669366
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} 1.028039{col 32}{space 2} .6404779{col 43}{space 1}    1.61{col 52}{space 3}0.111{col 60}{space 4}-.2378397{col 73}{space 3} 2.293917
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} 1.390057{col 32}{space 2} .6451197{col 43}{space 1}    2.15{col 52}{space 3}0.033{col 60}{space 4} .1150043{col 73}{space 3}  2.66511
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} 1.511534{col 32}{space 2} .6455946{col 43}{space 1}    2.34{col 52}{space 3}0.021{col 60}{space 4} .2355418{col 73}{space 3} 2.787525
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2}   .69478{col 32}{space 2} .8422513{col 43}{space 1}    0.82{col 52}{space 3}0.411{col 60}{space 4}-.9698957{col 73}{space 3} 2.359456
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2}-.2707454{col 32}{space 2} .9091659{col 43}{space 1}   -0.30{col 52}{space 3}0.766{col 60}{space 4}-2.067675{col 73}{space 3} 1.526184
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} 1.505188{col 32}{space 2} .6517441{col 43}{space 1}    2.31{col 52}{space 3}0.022{col 60}{space 4} .2170425{col 73}{space 3} 2.793334
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2}  1.21858{col 32}{space 2} .6414638{col 43}{space 1}    1.90{col 52}{space 3}0.059{col 60}{space 4}-.0492472{col 73}{space 3} 2.486407
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .8284799{col 32}{space 2} .7202004{col 43}{space 1}    1.15{col 52}{space 3}0.252{col 60}{space 4} -.594967{col 73}{space 3} 2.251927
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} 1.740077{col 32}{space 2} .6386531{col 43}{space 1}    2.72{col 52}{space 3}0.007{col 60}{space 4} .4778048{col 73}{space 3} 3.002349
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} 1.328515{col 32}{space 2}  .655488{col 43}{space 1}    2.03{col 52}{space 3}0.045{col 60}{space 4} .0329694{col 73}{space 3}  2.62406
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} 1.298199{col 32}{space 2} .6380437{col 43}{space 1}    2.03{col 52}{space 3}0.044{col 60}{space 4} .0371312{col 73}{space 3} 2.559266
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2} 1.281476{col 32}{space 2} .6600925{col 43}{space 1}    1.94{col 52}{space 3}0.054{col 60}{space 4}-.0231705{col 73}{space 3} 2.586122
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} 2.200675{col 32}{space 2}  .643599{col 43}{space 1}    3.42{col 52}{space 3}0.001{col 60}{space 4} .9286276{col 73}{space 3} 3.472722
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2} .8453146{col 32}{space 2} .6601894{col 43}{space 1}    1.28{col 52}{space 3}0.202{col 60}{space 4}-.4595231{col 73}{space 3} 2.150152
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} 1.079972{col 32}{space 2} .6296519{col 43}{space 1}    1.72{col 52}{space 3}0.088{col 60}{space 4}  -.16451{col 73}{space 3} 2.324453
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .8749228{col 32}{space 2} .6924153{col 43}{space 1}    1.26{col 52}{space 3}0.208{col 60}{space 4}-.4936079{col 73}{space 3} 2.243454
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} 1.490644{col 32}{space 2} .6660528{col 43}{space 1}    2.24{col 52}{space 3}0.027{col 60}{space 4} .1742179{col 73}{space 3} 2.807071
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-1.136615{col 32}{space 2} .6040287{col 43}{space 1}   -1.88{col 52}{space 3}0.062{col 60}{space 4}-2.330453{col 73}{space 3} .0572232
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         
.                         preserve
{txt}
{com}.                         keep if std_avg_sscore~=.
{txt}(3,609 observations deleted)

{com}.                         unique schoolid  /* 175 schools */
{txt}Number of unique values of schoolid is  {res}175
{txt}Number of records is  {res}5467
{txt}
{com}.                         sort schoolid
{txt}
{com}.                         by schoolid:keep if _n==1
{txt}(5,292 observations deleted)

{com}.                         count /*175 */
  {res}175
{txt}
{com}.                         svy: reg std_avg_sscore treat district#stratum  /* no sig diff at school level */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       30{txt}{col 49}Number of obs{col 67}= {res}       175
{txt}{col 1}Number of PSUs{col 20}= {res}      175{txt}{col 49}Population size{col 67}={res} 1,065.8404
{txt}{col 49}Design df{col 67}= {res}       145
{txt}{col 49}F({res}  30{txt},{res}    116{txt}){col 67}= {res}      2.36
{txt}{col 49}Prob > F{col 67}= {res}    0.0006
{txt}{col 49}R-squared{col 67}= {res}    0.3789

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}    std_avg_sscore{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2}-.0219312{col 32}{space 2} .1280824{col 43}{space 1}   -0.17{col 52}{space 3}0.864{col 60}{space 4}-.2750809{col 73}{space 3} .2312184
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2}  1.01429{col 32}{space 2} .5084669{col 43}{space 1}    1.99{col 52}{space 3}0.048{col 60}{space 4} .0093262{col 73}{space 3} 2.019255
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .5850647{col 32}{space 2} .5745995{col 43}{space 1}    1.02{col 52}{space 3}0.310{col 60}{space 4}-.5506079{col 73}{space 3} 1.720737
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2} .9303091{col 32}{space 2} .5901122{col 43}{space 1}    1.58{col 52}{space 3}0.117{col 60}{space 4}-.2360238{col 73}{space 3} 2.096642
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .9835762{col 32}{space 2} .5480043{col 43}{space 1}    1.79{col 52}{space 3}0.075{col 60}{space 4}-.0995321{col 73}{space 3} 2.066684
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .2664979{col 32}{space 2} .5774016{col 43}{space 1}    0.46{col 52}{space 3}0.645{col 60}{space 4} -.874713{col 73}{space 3} 1.407709
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .4881064{col 32}{space 2} .5343215{col 43}{space 1}    0.91{col 52}{space 3}0.362{col 60}{space 4}-.5679584{col 73}{space 3} 1.544171
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2}  .062617{col 32}{space 2} .8217814{col 43}{space 1}    0.08{col 52}{space 3}0.939{col 60}{space 4}-1.561601{col 73}{space 3} 1.686835
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} 1.270606{col 32}{space 2} .5587208{col 43}{space 1}    2.27{col 52}{space 3}0.024{col 60}{space 4} .1663173{col 73}{space 3} 2.374895
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2}-1.614754{col 32}{space 2} 1.214857{col 43}{space 1}   -1.33{col 52}{space 3}0.186{col 60}{space 4}-4.015869{col 73}{space 3} .7863608
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2}  .936346{col 32}{space 2}  .529685{col 43}{space 1}    1.77{col 52}{space 3}0.079{col 60}{space 4} -.110555{col 73}{space 3} 1.983247
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2}-.0207821{col 32}{space 2}  1.68899{col 43}{space 1}   -0.01{col 52}{space 3}0.990{col 60}{space 4}-3.359003{col 73}{space 3} 3.317439
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} 1.000002{col 32}{space 2} .5571862{col 43}{space 1}    1.79{col 52}{space 3}0.075{col 60}{space 4}-.1012536{col 73}{space 3} 2.101258
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2} .8669939{col 32}{space 2} .4989142{col 43}{space 1}    1.74{col 52}{space 3}0.084{col 60}{space 4}-.1190897{col 73}{space 3} 1.853078
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} 1.182796{col 32}{space 2} .5094895{col 43}{space 1}    2.32{col 52}{space 3}0.022{col 60}{space 4} .1758107{col 73}{space 3} 2.189782
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} 1.226975{col 32}{space 2} .5350837{col 43}{space 1}    2.29{col 52}{space 3}0.023{col 60}{space 4}  .169404{col 73}{space 3} 2.284547
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2}  .656691{col 32}{space 2} .6879839{col 43}{space 1}    0.95{col 52}{space 3}0.341{col 60}{space 4}-.7030814{col 73}{space 3} 2.016463
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2}-.1914363{col 32}{space 2} 1.097271{col 43}{space 1}   -0.17{col 52}{space 3}0.862{col 60}{space 4}-2.360149{col 73}{space 3} 1.977276
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} 1.353576{col 32}{space 2} .5176807{col 43}{space 1}    2.61{col 52}{space 3}0.010{col 60}{space 4} .3304009{col 73}{space 3} 2.376751
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .8779602{col 32}{space 2} .5177837{col 43}{space 1}    1.70{col 52}{space 3}0.092{col 60}{space 4}-.1454183{col 73}{space 3} 1.901339
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .7041409{col 32}{space 2} .5966662{col 43}{space 1}    1.18{col 52}{space 3}0.240{col 60}{space 4}-.4751458{col 73}{space 3} 1.883428
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} 1.451752{col 32}{space 2} .5068447{col 43}{space 1}    2.86{col 52}{space 3}0.005{col 60}{space 4} .4499943{col 73}{space 3} 2.453511
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} 1.047697{col 32}{space 2} .5266681{col 43}{space 1}    1.99{col 52}{space 3}0.049{col 60}{space 4} .0067585{col 73}{space 3} 2.088635
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} 1.041846{col 32}{space 2} .5237529{col 43}{space 1}    1.99{col 52}{space 3}0.049{col 60}{space 4} .0066697{col 73}{space 3} 2.077023
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2} 1.136393{col 32}{space 2} .5190031{col 43}{space 1}    2.19{col 52}{space 3}0.030{col 60}{space 4} .1106042{col 73}{space 3} 2.162182
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} 1.835326{col 32}{space 2} .5092734{col 43}{space 1}    3.60{col 52}{space 3}0.000{col 60}{space 4}  .828768{col 73}{space 3} 2.841885
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2} .6496664{col 32}{space 2} .5196652{col 43}{space 1}    1.25{col 52}{space 3}0.213{col 60}{space 4}-.3774309{col 73}{space 3} 1.676764
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2} 1.043241{col 32}{space 2} .5632136{col 43}{space 1}    1.85{col 52}{space 3}0.066{col 60}{space 4}-.0699276{col 73}{space 3}  2.15641
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .3189333{col 32}{space 2} .5990046{col 43}{space 1}    0.53{col 52}{space 3}0.595{col 60}{space 4}-.8649751{col 73}{space 3} 1.502842
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} 1.043093{col 32}{space 2} .5527449{col 43}{space 1}    1.89{col 52}{space 3}0.061{col 60}{space 4}-.0493854{col 73}{space 3} 2.135571
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.7240957{col 32}{space 2} .5047912{col 43}{space 1}   -1.43{col 52}{space 3}0.154{col 60}{space 4}-1.721795{col 73}{space 3} .2736037
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         restore
{txt}
{com}.                         
.                                                 
.                         *  prep interaction
.                         gen treatxsscore=treat*std_avg_sscore   
{txt}(3,609 missing values generated)

{com}. 
.                         
.                         * ITT estimation
.                         
.                         svy: reg stdIRTscigr10 treat std_avg_sscore treatxsscore Asnt_aft Math_1st district#stratum     /* 5467 obs */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       30{txt}{col 49}Number of obs{col 67}= {res}     5,467
{txt}{col 1}Number of PSUs{col 20}= {res}      175{txt}{col 49}Population size{col 67}={res} 33,345.141
{txt}{col 49}Design df{col 67}= {res}       145
{txt}{col 49}F({res}  34{txt},{res}    112{txt}){col 67}= {res}      9.10
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.1821

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}     stdIRTscigr10{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2} -.018192{col 32}{space 2} .0788002{col 43}{space 1}   -0.23{col 52}{space 3}0.818{col 60}{space 4}-.1739374{col 73}{space 3} .1375534
{txt}{space 4}std_avg_sscore {c |}{col 20}{res}{space 2} .0600963{col 32}{space 2} .0461366{col 43}{space 1}    1.30{col 52}{space 3}0.195{col 60}{space 4}-.0310908{col 73}{space 3} .1512833
{txt}{space 6}treatxsscore {c |}{col 20}{res}{space 2} -.025778{col 32}{space 2} .0754748{col 43}{space 1}   -0.34{col 52}{space 3}0.733{col 60}{space 4} -.174951{col 73}{space 3} .1233949
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2}-.0327999{col 32}{space 2} .0939837{col 43}{space 1}   -0.35{col 52}{space 3}0.728{col 60}{space 4}-.2185548{col 73}{space 3}  .152955
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2}-.0421239{col 32}{space 2} .0800364{col 43}{space 1}   -0.53{col 52}{space 3}0.599{col 60}{space 4}-.2003127{col 73}{space 3} .1160649
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .8394707{col 32}{space 2} .6256564{col 43}{space 1}    1.34{col 52}{space 3}0.182{col 60}{space 4}-.3971138{col 73}{space 3} 2.076055
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2}-.1100203{col 32}{space 2} .2665652{col 43}{space 1}   -0.41{col 52}{space 3}0.680{col 60}{space 4}-.6368756{col 73}{space 3} .4168351
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2}-.2700175{col 32}{space 2} .2560375{col 43}{space 1}   -1.05{col 52}{space 3}0.293{col 60}{space 4}-.7760653{col 73}{space 3} .2360303
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .7563347{col 32}{space 2} .2523675{col 43}{space 1}    3.00{col 52}{space 3}0.003{col 60}{space 4} .2575405{col 73}{space 3} 1.255129
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .0939009{col 32}{space 2} .1392763{col 43}{space 1}    0.67{col 52}{space 3}0.501{col 60}{space 4}-.1813731{col 73}{space 3} .3691749
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2}-.0318572{col 32}{space 2} .2112282{col 43}{space 1}   -0.15{col 52}{space 3}0.880{col 60}{space 4}-.4493411{col 73}{space 3} .3856268
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .3725767{col 32}{space 2} .1374668{col 43}{space 1}    2.71{col 52}{space 3}0.008{col 60}{space 4} .1008792{col 73}{space 3} .6442743
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .5191649{col 32}{space 2} .3538754{col 43}{space 1}    1.47{col 52}{space 3}0.145{col 60}{space 4}-.1802556{col 73}{space 3} 1.218585
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .6209026{col 32}{space 2} .2744832{col 43}{space 1}    2.26{col 52}{space 3}0.025{col 60}{space 4} .0783977{col 73}{space 3} 1.163408
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .2015402{col 32}{space 2} .1907918{col 43}{space 1}    1.06{col 52}{space 3}0.293{col 60}{space 4}-.1755521{col 73}{space 3} .5786325
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.049013{col 32}{space 2} .5199319{col 43}{space 1}    2.02{col 52}{space 3}0.045{col 60}{space 4} .0213882{col 73}{space 3} 2.076637
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2}-.0206063{col 32}{space 2} .1512654{col 43}{space 1}   -0.14{col 52}{space 3}0.892{col 60}{space 4}-.3195763{col 73}{space 3} .2783636
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2}-.1531454{col 32}{space 2} .1525184{col 43}{space 1}   -1.00{col 52}{space 3}0.317{col 60}{space 4}-.4545918{col 73}{space 3} .1483011
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2}  .968124{col 32}{space 2} .2588863{col 43}{space 1}    3.74{col 52}{space 3}0.000{col 60}{space 4} .4564458{col 73}{space 3} 1.479802
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2}  .548304{col 32}{space 2} .3410373{col 43}{space 1}    1.61{col 52}{space 3}0.110{col 60}{space 4}-.1257425{col 73}{space 3} 1.222351
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} .9764114{col 32}{space 2} .1929805{col 43}{space 1}    5.06{col 52}{space 3}0.000{col 60}{space 4} .5949933{col 73}{space 3}  1.35783
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2}  .472348{col 32}{space 2} .2256545{col 43}{space 1}    2.09{col 52}{space 3}0.038{col 60}{space 4}  .026351{col 73}{space 3}  .918345
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .4379261{col 32}{space 2} .1503162{col 43}{space 1}    2.91{col 52}{space 3}0.004{col 60}{space 4} .1408322{col 73}{space 3} .7350201
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .8347104{col 32}{space 2} .2252167{col 43}{space 1}    3.71{col 52}{space 3}0.000{col 60}{space 4} .3895787{col 73}{space 3} 1.279842
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2}  .215863{col 32}{space 2} .2531655{col 43}{space 1}    0.85{col 52}{space 3}0.395{col 60}{space 4}-.2845085{col 73}{space 3} .7162344
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2}  .161423{col 32}{space 2} .2461201{col 43}{space 1}    0.66{col 52}{space 3}0.513{col 60}{space 4}-.3250234{col 73}{space 3} .6478694
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .4261527{col 32}{space 2}  .188012{col 43}{space 1}    2.27{col 52}{space 3}0.025{col 60}{space 4} .0545545{col 73}{space 3} .7977509
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .3055961{col 32}{space 2} .3105887{col 43}{space 1}    0.98{col 52}{space 3}0.327{col 60}{space 4}-.3082698{col 73}{space 3}  .919462
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.5245758{col 32}{space 2} .1490742{col 43}{space 1}   -3.52{col 52}{space 3}0.001{col 60}{space 4}-.8192149{col 73}{space 3}-.2299367
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .1000573{col 32}{space 2} .1786717{col 43}{space 1}    0.56{col 52}{space 3}0.576{col 60}{space 4}-.2530801{col 73}{space 3} .4531948
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.5213481{col 32}{space 2} .1377022{col 43}{space 1}   -3.79{col 52}{space 3}0.000{col 60}{space 4}-.7935109{col 73}{space 3}-.2491853
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2}-.0778881{col 32}{space 2} .1466565{col 43}{space 1}   -0.53{col 52}{space 3}0.596{col 60}{space 4}-.3677488{col 73}{space 3} .2119725
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .0118396{col 32}{space 2} .2108448{col 43}{space 1}    0.06{col 52}{space 3}0.955{col 60}{space 4}-.4048865{col 73}{space 3} .4285657
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .3473006{col 32}{space 2} .2033895{col 43}{space 1}    1.71{col 52}{space 3}0.090{col 60}{space 4}-.0546905{col 73}{space 3} .7492916
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.1458378{col 32}{space 2} .1412743{col 43}{space 1}   -1.03{col 52}{space 3}0.304{col 60}{space 4}-.4250607{col 73}{space 3}  .133385
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         /* tiny negative base impact, negative interaction but small */
.                                                         
.                         test treat treatxsscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}treat = 0{p_end}
{p 0 7}{space 1}{text:( 2)}{space 1} treatxsscore = 0{p_end}

{txt}       F(  2,   144) ={res}    0.08
{txt}{col 13}Prob > F ={res}    0.9190
{txt}
{com}.                         test treatxsscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}treatxsscore = 0{p_end}

{txt}       F(  1,   145) ={res}    0.12
{txt}{col 13}Prob > F ={res}    0.7332
{txt}
{com}.                         lincom treat + treatxsscore  /* for teachers 1 std dev above average of teacher test score */

{p 0 7}{space 1}{text:( 1)}{space 1} {res}treat + treatxsscore = 0{p_end}

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}stdIRTsci~10{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}(1) {c |}{col 14}{res}{space 2}  -.04397{col 26}{space 2} .1090167{col 37}{space 1}   -0.40{col 46}{space 3}0.687{col 54}{space 4}-.2594371{col 67}{space 3}  .171497
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         /* treatment when test score avearage is one std dev above average is very imprecise */
.                         
.                         
.                                         
.                         * check what un-interacted treatment looks like on this smaller sample
.                         svy:reg stdIRTscigr10 treat Asnt_aft Math_1st district#stratum if treatxsscore~=.
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       30{txt}{col 49}Number of obs{col 67}= {res}     5,467
{txt}{col 1}Number of PSUs{col 20}= {res}      175{txt}{col 49}Population size{col 67}={res} 33,345.141
{txt}{col 49}Design df{col 67}= {res}       145
{txt}{col 49}F({res}  32{txt},{res}    114{txt}){col 67}= {res}      9.25
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.1807

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}     stdIRTscigr10{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2}-.0222377{col 32}{space 2} .0791916{col 43}{space 1}   -0.28{col 52}{space 3}0.779{col 60}{space 4}-.1787566{col 73}{space 3} .1342813
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2}-.0254143{col 32}{space 2} .0919985{col 43}{space 1}   -0.28{col 52}{space 3}0.783{col 60}{space 4}-.2072456{col 73}{space 3} .1564171
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2}-.0345419{col 32}{space 2} .0817934{col 43}{space 1}   -0.42{col 52}{space 3}0.673{col 60}{space 4}-.1962033{col 73}{space 3} .1271196
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .9129648{col 32}{space 2} .6459777{col 43}{space 1}    1.41{col 52}{space 3}0.160{col 60}{space 4} -.363784{col 73}{space 3} 2.189714
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} -.078841{col 32}{space 2} .2835105{col 43}{space 1}   -0.28{col 52}{space 3}0.781{col 60}{space 4} -.639188{col 73}{space 3}  .481506
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2}-.1960542{col 32}{space 2} .2685274{col 43}{space 1}   -0.73{col 52}{space 3}0.467{col 60}{space 4}-.7267878{col 73}{space 3} .3346794
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .8190357{col 32}{space 2} .2698544{col 43}{space 1}    3.04{col 52}{space 3}0.003{col 60}{space 4} .2856795{col 73}{space 3} 1.352392
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .1261501{col 32}{space 2} .1585731{col 43}{space 1}    0.80{col 52}{space 3}0.428{col 60}{space 4}-.1872632{col 73}{space 3} .4395635
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .0132201{col 32}{space 2} .2318335{col 43}{space 1}    0.06{col 52}{space 3}0.955{col 60}{space 4}-.4449894{col 73}{space 3} .4714296
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .4058403{col 32}{space 2} .1641043{col 43}{space 1}    2.47{col 52}{space 3}0.015{col 60}{space 4} .0814947{col 73}{space 3} .7301858
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .5946087{col 32}{space 2} .3664358{col 43}{space 1}    1.62{col 52}{space 3}0.107{col 60}{space 4}-.1296369{col 73}{space 3} 1.318854
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .5639894{col 32}{space 2}  .348474{col 43}{space 1}    1.62{col 52}{space 3}0.108{col 60}{space 4}-.1247553{col 73}{space 3} 1.252734
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .2666239{col 32}{space 2} .2018728{col 43}{space 1}    1.32{col 52}{space 3}0.189{col 60}{space 4}-.1323694{col 73}{space 3} .6656173
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2}  1.10025{col 32}{space 2}  .477776{col 43}{space 1}    2.30{col 52}{space 3}0.023{col 60}{space 4} .1559448{col 73}{space 3} 2.044555
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .0535433{col 32}{space 2} .1709797{col 43}{space 1}    0.31{col 52}{space 3}0.755{col 60}{space 4}-.2843911{col 73}{space 3} .3914778
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2}-.0953485{col 32}{space 2}  .172673{col 43}{space 1}   -0.55{col 52}{space 3}0.582{col 60}{space 4}-.4366297{col 73}{space 3} .2459327
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} 1.040811{col 32}{space 2}  .258826{col 43}{space 1}    4.02{col 52}{space 3}0.000{col 60}{space 4}  .529252{col 73}{space 3}  1.55237
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} .6253811{col 32}{space 2} .3531584{col 43}{space 1}    1.77{col 52}{space 3}0.079{col 60}{space 4}-.0726223{col 73}{space 3} 1.323384
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} 1.027029{col 32}{space 2} .2159881{col 43}{space 1}    4.76{col 52}{space 3}0.000{col 60}{space 4} .6001376{col 73}{space 3} 1.453921
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} .4678871{col 32}{space 2} .2492834{col 43}{space 1}    1.88{col 52}{space 3}0.063{col 60}{space 4}-.0248115{col 73}{space 3} .9605857
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .5229089{col 32}{space 2}  .173876{col 43}{space 1}    3.01{col 52}{space 3}0.003{col 60}{space 4}   .17925{col 73}{space 3} .8665679
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .9034741{col 32}{space 2} .2322392{col 43}{space 1}    3.89{col 52}{space 3}0.000{col 60}{space 4} .4444627{col 73}{space 3} 1.362485
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .2671241{col 32}{space 2} .2550243{col 43}{space 1}    1.05{col 52}{space 3}0.297{col 60}{space 4}-.2369211{col 73}{space 3} .7711693
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .2535552{col 32}{space 2} .2648953{col 43}{space 1}    0.96{col 52}{space 3}0.340{col 60}{space 4}-.2699997{col 73}{space 3} .7771101
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .5039521{col 32}{space 2} .2032841{col 43}{space 1}    2.48{col 52}{space 3}0.014{col 60}{space 4} .1021692{col 73}{space 3} .9057349
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .3741987{col 32}{space 2} .3136251{col 43}{space 1}    1.19{col 52}{space 3}0.235{col 60}{space 4}-.2456685{col 73}{space 3} .9940659
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.4586363{col 32}{space 2} .1690339{col 43}{space 1}   -2.71{col 52}{space 3}0.007{col 60}{space 4}-.7927249{col 73}{space 3}-.1245478
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .2223253{col 32}{space 2} .1781784{col 43}{space 1}    1.25{col 52}{space 3}0.214{col 60}{space 4}-.1298371{col 73}{space 3} .5744877
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.4694297{col 32}{space 2}  .163006{col 43}{space 1}   -2.88{col 52}{space 3}0.005{col 60}{space 4}-.7916044{col 73}{space 3}-.1472549
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2}-.0131808{col 32}{space 2} .1658648{col 43}{space 1}   -0.08{col 52}{space 3}0.937{col 60}{space 4}-.3410058{col 73}{space 3} .3146442
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .0560946{col 32}{space 2} .2233352{col 43}{space 1}    0.25{col 52}{space 3}0.802{col 60}{space 4}-.3853185{col 73}{space 3} .4975077
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .4365111{col 32}{space 2} .2207347{col 43}{space 1}    1.98{col 52}{space 3}0.050{col 60}{space 4} .0002378{col 73}{space 3} .8727843
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.2073327{col 32}{space 2} .1629348{col 43}{space 1}   -1.27{col 52}{space 3}0.205{col 60}{space 4}-.5293668{col 73}{space 3} .1147014
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         svy:reg stdIRTscigr10 treat Asnt_aft Math_1st district#stratum  /* sample change doesn't make a big difference */
{res}{txt}(running {bf:regress} on estimation sample)
{res}
{txt}Survey: Linear regression

{col 1}Number of strata{col 20}= {res}       30{txt}{col 49}Number of obs{col 67}= {res}     5,829
{txt}{col 1}Number of PSUs{col 20}= {res}      189{txt}{col 49}Population size{col 67}={res} 35,567.352
{txt}{col 49}Design df{col 67}= {res}       159
{txt}{col 49}F({res}  32{txt},{res}    128{txt}){col 67}= {res}      8.45
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.1807

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}     stdIRTscigr10{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 13}treat {c |}{col 20}{res}{space 2} .0057965{col 32}{space 2} .0740604{col 43}{space 1}    0.08{col 52}{space 3}0.938{col 60}{space 4}-.1404725{col 73}{space 3} .1520655
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2}-.0069603{col 32}{space 2} .0884959{col 43}{space 1}   -0.08{col 52}{space 3}0.937{col 60}{space 4}-.1817394{col 73}{space 3} .1678188
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2} -.013682{col 32}{space 2} .0775293{col 43}{space 1}   -0.18{col 52}{space 3}0.860{col 60}{space 4}-.1668021{col 73}{space 3}  .139438
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2}   .90295{col 32}{space 2} .6572344{col 43}{space 1}    1.37{col 52}{space 3}0.171{col 60}{space 4}-.3950854{col 73}{space 3} 2.200985
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2}-.0811875{col 32}{space 2} .2832399{col 43}{space 1}   -0.29{col 52}{space 3}0.775{col 60}{space 4}-.6405852{col 73}{space 3} .4782103
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2}-.2004479{col 32}{space 2} .2674697{col 43}{space 1}   -0.75{col 52}{space 3}0.455{col 60}{space 4}-.7286995{col 73}{space 3} .3278037
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .8256713{col 32}{space 2}  .245904{col 43}{space 1}    3.36{col 52}{space 3}0.001{col 60}{space 4} .3400118{col 73}{space 3} 1.311331
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .1175836{col 32}{space 2} .1666083{col 43}{space 1}    0.71{col 52}{space 3}0.481{col 60}{space 4}-.2114672{col 73}{space 3} .4466344
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2} .0021786{col 32}{space 2} .2349239{col 43}{space 1}    0.01{col 52}{space 3}0.993{col 60}{space 4}-.4617953{col 73}{space 3} .4661524
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2}   .39703{col 32}{space 2} .1633249{col 43}{space 1}    2.43{col 52}{space 3}0.016{col 60}{space 4} .0744639{col 73}{space 3} .7195961
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .4696187{col 32}{space 2} .3612317{col 43}{space 1}    1.30{col 52}{space 3}0.195{col 60}{space 4}-.2438126{col 73}{space 3}  1.18305
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .4996267{col 32}{space 2} .3154049{col 43}{space 1}    1.58{col 52}{space 3}0.115{col 60}{space 4}-.1232968{col 73}{space 3}  1.12255
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .2592389{col 32}{space 2} .2088415{col 43}{space 1}    1.24{col 52}{space 3}0.216{col 60}{space 4}-.1532222{col 73}{space 3}    .6717
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.052866{col 32}{space 2} .3470336{col 43}{space 1}    3.03{col 52}{space 3}0.003{col 60}{space 4} .3674759{col 73}{space 3} 1.738256
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .0486545{col 32}{space 2} .1735043{col 43}{space 1}    0.28{col 52}{space 3}0.780{col 60}{space 4}-.2940158{col 73}{space 3} .3913248
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2}-.1101977{col 32}{space 2} .1781366{col 43}{space 1}   -0.62{col 52}{space 3}0.537{col 60}{space 4}-.4620168{col 73}{space 3} .2416215
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2}  1.03825{col 32}{space 2} .2649993{col 43}{space 1}    3.92{col 52}{space 3}0.000{col 60}{space 4} .5148777{col 73}{space 3} 1.561623
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2} .6219152{col 32}{space 2} .3494773{col 43}{space 1}    1.78{col 52}{space 3}0.077{col 60}{space 4}-.0683012{col 73}{space 3} 1.312132
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} 1.027273{col 32}{space 2} .2187068{col 43}{space 1}    4.70{col 52}{space 3}0.000{col 60}{space 4} .5953276{col 73}{space 3} 1.459218
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} .4901632{col 32}{space 2} .1975969{col 43}{space 1}    2.48{col 52}{space 3}0.014{col 60}{space 4} .0999101{col 73}{space 3} .8804163
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .5288671{col 32}{space 2} .1759499{col 43}{space 1}    3.01{col 52}{space 3}0.003{col 60}{space 4} .1813668{col 73}{space 3} .8763674
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .9011763{col 32}{space 2} .2318483{col 43}{space 1}    3.89{col 52}{space 3}0.000{col 60}{space 4} .4432767{col 73}{space 3} 1.359076
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .2643611{col 32}{space 2} .2555108{col 43}{space 1}    1.03{col 52}{space 3}0.302{col 60}{space 4}-.2402719{col 73}{space 3}  .768994
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .2443274{col 32}{space 2} .2686931{col 43}{space 1}    0.91{col 52}{space 3}0.365{col 60}{space 4}-.2863404{col 73}{space 3} .7749952
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .4728084{col 32}{space 2} .1933849{col 43}{space 1}    2.44{col 52}{space 3}0.016{col 60}{space 4} .0908738{col 73}{space 3} .8547429
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .3800827{col 32}{space 2} .3152806{col 43}{space 1}    1.21{col 52}{space 3}0.230{col 60}{space 4}-.2425953{col 73}{space 3} 1.002761
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.4077425{col 32}{space 2} .2006873{col 43}{space 1}   -2.03{col 52}{space 3}0.044{col 60}{space 4}-.8040991{col 73}{space 3}-.0113858
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .2406721{col 32}{space 2} .1769815{col 43}{space 1}    1.36{col 52}{space 3}0.176{col 60}{space 4}-.1088657{col 73}{space 3} .5902099
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2} -.504451{col 32}{space 2} .1678208{col 43}{space 1}   -3.01{col 52}{space 3}0.003{col 60}{space 4}-.8358964{col 73}{space 3}-.1730055
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2}-.0096287{col 32}{space 2} .1673989{col 43}{space 1}   -0.06{col 52}{space 3}0.954{col 60}{space 4}-.3402409{col 73}{space 3} .3209836
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .0554278{col 32}{space 2} .2268188{col 43}{space 1}    0.24{col 52}{space 3}0.807{col 60}{space 4}-.3925384{col 73}{space 3}  .503394
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .4417649{col 32}{space 2} .2228188{col 43}{space 1}    1.98{col 52}{space 3}0.049{col 60}{space 4} .0016987{col 73}{space 3} .8818311
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.2390828{col 32}{space 2} .1657814{col 43}{space 1}   -1.44{col 52}{space 3}0.151{col 60}{space 4}-.5665003{col 73}{space 3} .0883348
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         
.                         * Set up for LATE 
.                         
.                         * Generate dummy variable for LATE regressions: teacher actually trained in 2 types of training
.                         gen tchrtreat_s=ssdp_s_t*treat
{txt}(4,073 missing values generated)

{com}.                                                 
.                         summ tchrtreat_s treat std_avg_sscore

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 1}tchrtreat_s {c |}{res}      5,003    .2434539    .4233473          0          1
{txt}{space 7}treat {c |}{res}      5,829    .4618288    .4985836          0          1
{txt}std_avg_ss~e {c |}{res}      5,467    .1091244    .8834689  -3.897635   1.240489
{txt}
{com}.                         count if tchrtreat_s~=. & std_avg_sscore~=.    /* 4838 */
  {res}4,838
{txt}
{com}.                                                                                                 
.                         * LATE regression without interaction  but with the standardized teacher sci score as a regressor  
.                         
.                         svy: ivregress 2sls stdIRTscigr10 Asnt_aft Math_1st std_avg_sscore district#stratum  (tchrtreat_s = treat) /*This works. */
{res}{txt}(running {bf:ivregress} on estimation sample)
{res}
{txt}Survey: Instrumental variables (2SLS) regression

{col 1}Number of strata{col 20}= {res}       30{txt}{col 49}Number of obs{col 67}= {res}     4,838
{txt}{col 1}Number of PSUs{col 20}= {res}      161{txt}{col 49}Population size{col 67}={res} 30,323.641
{txt}{col 49}Design df{col 67}= {res}       131
{txt}{col 49}F({res}  33{txt},{res}     99{txt}){col 67}= {res}      9.84
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.1763

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}     stdIRTscigr10{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}tchrtreat_s {c |}{col 20}{res}{space 2}-.0849306{col 32}{space 2} .1614543{col 43}{space 1}   -0.53{col 52}{space 3}0.600{col 60}{space 4}-.4043258{col 73}{space 3} .2344645
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2}-.0117033{col 32}{space 2} .1015149{col 43}{space 1}   -0.12{col 52}{space 3}0.908{col 60}{space 4}-.2125239{col 73}{space 3} .1891174
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2}-.0676123{col 32}{space 2} .0851613{col 43}{space 1}   -0.79{col 52}{space 3}0.429{col 60}{space 4}-.2360817{col 73}{space 3} .1008571
{txt}{space 4}std_avg_sscore {c |}{col 20}{res}{space 2}  .075892{col 32}{space 2} .0423285{col 43}{space 1}    1.79{col 52}{space 3}0.075{col 60}{space 4}-.0078438{col 73}{space 3} .1596278
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .8459594{col 32}{space 2} .6219785{col 43}{space 1}    1.36{col 52}{space 3}0.176{col 60}{space 4}-.3844624{col 73}{space 3} 2.076381
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2} .0173018{col 32}{space 2} .3135048{col 43}{space 1}    0.06{col 52}{space 3}0.956{col 60}{space 4}-.6028855{col 73}{space 3} .6374891
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2}-.2852224{col 32}{space 2} .2533784{col 43}{space 1}   -1.13{col 52}{space 3}0.262{col 60}{space 4}-.7864654{col 73}{space 3} .2160206
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .8351869{col 32}{space 2} .2907364{col 43}{space 1}    2.87{col 52}{space 3}0.005{col 60}{space 4}  .260041{col 73}{space 3} 1.410333
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .0943282{col 32}{space 2} .1313971{col 43}{space 1}    0.72{col 52}{space 3}0.474{col 60}{space 4}-.1656067{col 73}{space 3} .3542631
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2}-.0153381{col 32}{space 2} .1961592{col 43}{space 1}   -0.08{col 52}{space 3}0.938{col 60}{space 4}-.4033879{col 73}{space 3} .3727116
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .3431875{col 32}{space 2} .1416683{col 43}{space 1}    2.42{col 52}{space 3}0.017{col 60}{space 4} .0629337{col 73}{space 3} .6234413
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .4985311{col 32}{space 2} .3633823{col 43}{space 1}    1.37{col 52}{space 3}0.172{col 60}{space 4}-.2203258{col 73}{space 3} 1.217388
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2}  .624504{col 32}{space 2}  .259182{col 43}{space 1}    2.41{col 52}{space 3}0.017{col 60}{space 4} .1117802{col 73}{space 3} 1.137228
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2}   .18054{col 32}{space 2} .1920571{col 43}{space 1}    0.94{col 52}{space 3}0.349{col 60}{space 4}-.1993947{col 73}{space 3} .5604747
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.041246{col 32}{space 2} .5602535{col 43}{space 1}    1.86{col 52}{space 3}0.065{col 60}{space 4} -.067069{col 73}{space 3} 2.149561
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2} .0314099{col 32}{space 2} .1434226{col 43}{space 1}    0.22{col 52}{space 3}0.827{col 60}{space 4}-.2523141{col 73}{space 3} .3151339
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2}-.0629722{col 32}{space 2} .2703766{col 43}{space 1}   -0.23{col 52}{space 3}0.816{col 60}{space 4}-.5978417{col 73}{space 3} .4718973
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} .9526443{col 32}{space 2} .2605933{col 43}{space 1}    3.66{col 52}{space 3}0.000{col 60}{space 4} .4371286{col 73}{space 3}  1.46816
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2}  .514097{col 32}{space 2} .3482312{col 43}{space 1}    1.48{col 52}{space 3}0.142{col 60}{space 4}-.1747874{col 73}{space 3} 1.202981
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2} .8694842{col 32}{space 2} .2253047{col 43}{space 1}    3.86{col 52}{space 3}0.000{col 60}{space 4} .4237777{col 73}{space 3} 1.315191
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} .3108602{col 32}{space 2} .2310929{col 43}{space 1}    1.35{col 52}{space 3}0.181{col 60}{space 4}-.1462966{col 73}{space 3} .7680169
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .3357023{col 32}{space 2} .1490835{col 43}{space 1}    2.25{col 52}{space 3}0.026{col 60}{space 4} .0407795{col 73}{space 3}  .630625
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .6321148{col 32}{space 2} .1529442{col 43}{space 1}    4.13{col 52}{space 3}0.000{col 60}{space 4} .3295547{col 73}{space 3} .9346749
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2} .2049361{col 32}{space 2}  .277766{col 43}{space 1}    0.74{col 52}{space 3}0.462{col 60}{space 4}-.3445512{col 73}{space 3} .7544235
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .1063598{col 32}{space 2}  .257691{col 43}{space 1}    0.41{col 52}{space 3}0.680{col 60}{space 4}-.4034145{col 73}{space 3} .6161341
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .4091907{col 32}{space 2} .1899373{col 43}{space 1}    2.15{col 52}{space 3}0.033{col 60}{space 4} .0334494{col 73}{space 3} .7849321
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .3687961{col 32}{space 2} .4891446{col 43}{space 1}    0.75{col 52}{space 3}0.452{col 60}{space 4}-.5988485{col 73}{space 3} 1.336441
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2} -.534669{col 32}{space 2} .1483734{col 43}{space 1}   -3.60{col 52}{space 3}0.000{col 60}{space 4} -.828187{col 73}{space 3}-.2411511
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .4978159{col 32}{space 2} .3034765{col 43}{space 1}    1.64{col 52}{space 3}0.103{col 60}{space 4}-.1025329{col 73}{space 3} 1.098165
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.5272391{col 32}{space 2} .1341371{col 43}{space 1}   -3.93{col 52}{space 3}0.000{col 60}{space 4}-.7925943{col 73}{space 3} -.261884
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2}-.2013119{col 32}{space 2} .1912743{col 43}{space 1}   -1.05{col 52}{space 3}0.295{col 60}{space 4}-.5796982{col 73}{space 3} .1770744
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2} .0013173{col 32}{space 2} .2176154{col 43}{space 1}    0.01{col 52}{space 3}0.995{col 60}{space 4}-.4291779{col 73}{space 3} .4318126
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2}  .336891{col 32}{space 2} .2130923{col 43}{space 1}    1.58{col 52}{space 3}0.116{col 60}{space 4}-.0846564{col 73}{space 3} .7584385
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.1208333{col 32}{space 2} .1403731{col 43}{space 1}   -0.86{col 52}{space 3}0.391{col 60}{space 4}-.3985247{col 73}{space 3} .1568581
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 15 31}Instrumented:{space 2}tchrtreat_s{p_end}
{p 0 15 31}Instruments:{space 3}Asnt_aft Math_1st std_avg_sscore 2b.district#2.stratum 5.district#1b.stratum 5.district#2.stratum 11.district#1b.stratum 11.district#2.stratum 20.district#1b.stratum 20.district#2.stratum 24.district#1b.stratum 24.district#2.stratum 28.district#1b.stratum 28.district#2.stratum 34.district#1b.stratum 34.district#2.stratum 35.district#1b.stratum 35.district#2.stratum 37.district#1b.stratum 37.district#2.stratum 45.district#1b.stratum 45.district#2.stratum 50.district#1b.stratum 50.district#2.stratum 51.district#1b.stratum 51.district#2.stratum 55.district#1b.stratum 55.district#2.stratum 60.district#1b.stratum 60.district#2.stratum 69.district#1b.stratum 69.district#2.stratum treat{p_end}
{hline 84}

{com}.                                 
.                         
.                         * LATE regression with interaction
.                         gen tchrtreatxsscore = tchrtreat_s*std_avg_sscore
{txt}(4,238 missing values generated)

{com}.                         svy: ivregress 2sls stdIRTscigr10 Asnt_aft Math_1st std_avg_sscore district#stratum (tchrtreat_s tchrtreatxsscore = treat treatxsscore)
{res}{txt}(running {bf:ivregress} on estimation sample)
{res}
{txt}Survey: Instrumental variables (2SLS) regression

{col 1}Number of strata{col 20}= {res}       30{txt}{col 49}Number of obs{col 67}= {res}     4,838
{txt}{col 1}Number of PSUs{col 20}= {res}      161{txt}{col 49}Population size{col 67}={res} 30,323.641
{txt}{col 49}Design df{col 67}= {res}       131
{txt}{col 49}F({res}  34{txt},{res}     98{txt}){col 67}= {res}      9.99
{txt}{col 49}Prob > F{col 67}= {res}    0.0000
{txt}{col 49}R-squared{col 67}= {res}    0.1710

{txt}{hline 19}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 20}{c |}{col 32}  Linearized
{col 1}     stdIRTscigr10{col 20}{c |}      Coef.{col 32}   Std. Err.{col 44}      t{col 52}   P>|t|{col 60}     [95% Con{col 73}f. Interval]
{hline 19}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 7}tchrtreat_s {c |}{col 20}{res}{space 2}-.0557968{col 32}{space 2} .1735452{col 43}{space 1}   -0.32{col 52}{space 3}0.748{col 60}{space 4}-.3991106{col 73}{space 3}  .287517
{txt}{space 2}tchrtreatxsscore {c |}{col 20}{res}{space 2}-.1454256{col 32}{space 2} .1995102{col 43}{space 1}   -0.73{col 52}{space 3}0.467{col 60}{space 4}-.5401043{col 73}{space 3} .2492532
{txt}{space 10}Asnt_aft {c |}{col 20}{res}{space 2} .0036744{col 32}{space 2} .1019341{col 43}{space 1}    0.04{col 52}{space 3}0.971{col 60}{space 4}-.1979755{col 73}{space 3} .2053244
{txt}{space 10}Math_1st {c |}{col 20}{res}{space 2}-.0859851{col 32}{space 2} .0854681{col 43}{space 1}   -1.01{col 52}{space 3}0.316{col 60}{space 4}-.2550614{col 73}{space 3} .0830911
{txt}{space 4}std_avg_sscore {c |}{col 20}{res}{space 2} .1065035{col 32}{space 2} .0519312{col 43}{space 1}    2.05{col 52}{space 3}0.042{col 60}{space 4} .0037712{col 73}{space 3} .2092358
{txt}{space 18} {c |}
{space 2}district#stratum {c |}
{space 6}Panchthar#2  {c |}{col 20}{res}{space 2} .8080813{col 32}{space 2} .6258523{col 43}{space 1}    1.29{col 52}{space 3}0.199{col 60}{space 4}-.4300038{col 73}{space 3} 2.046167
{txt}{space 9}Morang#1  {c |}{col 20}{res}{space 2}-.0011604{col 32}{space 2} .2929987{col 43}{space 1}   -0.00{col 52}{space 3}0.997{col 60}{space 4}-.5807817{col 73}{space 3} .5784609
{txt}{space 9}Morang#2  {c |}{col 20}{res}{space 2}-.3111509{col 32}{space 2} .2561025{col 43}{space 1}   -1.21{col 52}{space 3}0.227{col 60}{space 4}-.8177828{col 73}{space 3} .1954809
{txt}{space 5}Solukhumbu#1  {c |}{col 20}{res}{space 2} .8205595{col 32}{space 2} .3028557{col 43}{space 1}    2.71{col 52}{space 3}0.008{col 60}{space 4} .2214387{col 73}{space 3}  1.41968
{txt}{space 5}Solukhumbu#2  {c |}{col 20}{res}{space 2} .0530382{col 32}{space 2} .1417405{col 43}{space 1}    0.37{col 52}{space 3}0.709{col 60}{space 4}-.2273582{col 73}{space 3} .3334347
{txt}{space 7}Sindhuli#1  {c |}{col 20}{res}{space 2}-.0889991{col 32}{space 2} .2272492{col 43}{space 1}   -0.39{col 52}{space 3}0.696{col 60}{space 4}-.5385522{col 73}{space 3}  .360554
{txt}{space 7}Sindhuli#2  {c |}{col 20}{res}{space 2} .3056298{col 32}{space 2}  .142421{col 43}{space 1}    2.15{col 52}{space 3}0.034{col 60}{space 4} .0238872{col 73}{space 3} .5873724
{txt}Kavrepalanchowk#1  {c |}{col 20}{res}{space 2} .4913295{col 32}{space 2} .3651222{col 43}{space 1}    1.35{col 52}{space 3}0.181{col 60}{space 4}-.2309693{col 73}{space 3} 1.213628
{txt}Kavrepalanchowk#2  {c |}{col 20}{res}{space 2} .6463665{col 32}{space 2} .2235917{col 43}{space 1}    2.89{col 52}{space 3}0.004{col 60}{space 4} .2040487{col 73}{space 3} 1.088684
{txt}{space 8}Nuwakot#1  {c |}{col 20}{res}{space 2} .1532685{col 32}{space 2} .1921666{col 43}{space 1}    0.80{col 52}{space 3}0.427{col 60}{space 4}-.2268829{col 73}{space 3} .5334199
{txt}{space 8}Nuwakot#2  {c |}{col 20}{res}{space 2} 1.017794{col 32}{space 2} .5909128{col 43}{space 1}    1.72{col 52}{space 3}0.087{col 60}{space 4}-.1511721{col 73}{space 3} 2.186761
{txt}{space 10}Parsa#1  {c |}{col 20}{res}{space 2}-.0073024{col 32}{space 2} .1470243{col 43}{space 1}   -0.05{col 52}{space 3}0.960{col 60}{space 4}-.2981516{col 73}{space 3} .2835467
{txt}{space 10}Parsa#2  {c |}{col 20}{res}{space 2}-.0981242{col 32}{space 2} .2905936{col 43}{space 1}   -0.34{col 52}{space 3}0.736{col 60}{space 4}-.6729876{col 73}{space 3} .4767393
{txt}{space 8}Chitwan#1  {c |}{col 20}{res}{space 2} .9292942{col 32}{space 2} .2626842{col 43}{space 1}    3.54{col 52}{space 3}0.001{col 60}{space 4} .4096422{col 73}{space 3} 1.448946
{txt}{space 8}Chitwan#2  {c |}{col 20}{res}{space 2}  .493354{col 32}{space 2} .3631177{col 43}{space 1}    1.36{col 52}{space 3}0.177{col 60}{space 4}-.2249793{col 73}{space 3} 1.211687
{txt}{space 8}Lamjung#1  {c |}{col 20}{res}{space 2}  .784573{col 32}{space 2} .2605134{col 43}{space 1}    3.01{col 52}{space 3}0.003{col 60}{space 4} .2692152{col 73}{space 3} 1.299931
{txt}{space 8}Lamjung#2  {c |}{col 20}{res}{space 2} .3533403{col 32}{space 2} .2244338{col 43}{space 1}    1.57{col 52}{space 3}0.118{col 60}{space 4}-.0906434{col 73}{space 3} .7973239
{txt}{space 8}Baglung#1  {c |}{col 20}{res}{space 2} .3010632{col 32}{space 2}  .149889{col 43}{space 1}    2.01{col 52}{space 3}0.047{col 60}{space 4} .0045471{col 73}{space 3} .5975794
{txt}{space 8}Baglung#2  {c |}{col 20}{res}{space 2} .5917104{col 32}{space 2} .1528441{col 43}{space 1}    3.87{col 52}{space 3}0.000{col 60}{space 4} .2893482{col 73}{space 3} .8940726
{txt}{space 5}Kapilbastu#1  {c |}{col 20}{res}{space 2}  .134978{col 32}{space 2} .3149317{col 43}{space 1}    0.43{col 52}{space 3}0.669{col 60}{space 4} -.488032{col 73}{space 3} .7579879
{txt}{space 5}Kapilbastu#2  {c |}{col 20}{res}{space 2} .0511742{col 32}{space 2} .2509527{col 43}{space 1}    0.20{col 52}{space 3}0.839{col 60}{space 4}-.4452701{col 73}{space 3} .5476184
{txt}{space 3}Arghakhanchi#1  {c |}{col 20}{res}{space 2} .3522478{col 32}{space 2}  .201204{col 43}{space 1}    1.75{col 52}{space 3}0.082{col 60}{space 4}-.0457817{col 73}{space 3} .7502774
{txt}{space 3}Arghakhanchi#2  {c |}{col 20}{res}{space 2} .3411947{col 32}{space 2}  .491426{col 43}{space 1}    0.69{col 52}{space 3}0.489{col 60}{space 4}-.6309632{col 73}{space 3} 1.313353
{txt}{space 9}Salyan#1  {c |}{col 20}{res}{space 2}-.5442003{col 32}{space 2} .1423072{col 43}{space 1}   -3.82{col 52}{space 3}0.000{col 60}{space 4}-.8257178{col 73}{space 3}-.2626828
{txt}{space 9}Salyan#2  {c |}{col 20}{res}{space 2} .4353766{col 32}{space 2} .3072082{col 43}{space 1}    1.42{col 52}{space 3}0.159{col 60}{space 4}-.1723545{col 73}{space 3} 1.043108
{txt}{space 8}Dailekh#1  {c |}{col 20}{res}{space 2}-.5920773{col 32}{space 2} .1481594{col 43}{space 1}   -4.00{col 52}{space 3}0.000{col 60}{space 4}-.8851718{col 73}{space 3}-.2989827
{txt}{space 8}Dailekh#2  {c |}{col 20}{res}{space 2}-.2406264{col 32}{space 2} .1939734{col 43}{space 1}   -1.24{col 52}{space 3}0.217{col 60}{space 4}-.6243521{col 73}{space 3} .1430992
{txt}{space 9}Achham#1  {c |}{col 20}{res}{space 2}-.0036133{col 32}{space 2} .2190691{col 43}{space 1}   -0.02{col 52}{space 3}0.987{col 60}{space 4}-.4369843{col 73}{space 3} .4297576
{txt}{space 9}Achham#2  {c |}{col 20}{res}{space 2} .2705221{col 32}{space 2} .2158945{col 43}{space 1}    1.25{col 52}{space 3}0.212{col 60}{space 4}-.1565688{col 73}{space 3} .6976131
{txt}{space 18} {c |}
{space 13}_cons {c |}{col 20}{res}{space 2}-.0897405{col 32}{space 2} .1386909{col 43}{space 1}   -0.65{col 52}{space 3}0.519{col 60}{space 4}-.3641043{col 73}{space 3} .1846232
{txt}{hline 19}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{p 0 15 31}Instrumented:{space 2}tchrtreat_s tchrtreatxsscore{p_end}
{p 0 15 31}Instruments:{space 3}Asnt_aft Math_1st std_avg_sscore 2b.district#2.stratum 5.district#1b.stratum 5.district#2.stratum 11.district#1b.stratum 11.district#2.stratum 20.district#1b.stratum 20.district#2.stratum 24.district#1b.stratum 24.district#2.stratum 28.district#1b.stratum 28.district#2.stratum 34.district#1b.stratum 34.district#2.stratum 35.district#1b.stratum 35.district#2.stratum 37.district#1b.stratum 37.district#2.stratum 45.district#1b.stratum 45.district#2.stratum 50.district#1b.stratum 50.district#2.stratum 51.district#1b.stratum 51.district#2.stratum 55.district#1b.stratum 55.district#2.stratum 60.district#1b.stratum 60.district#2.stratum 69.district#1b.stratum 69.district#2.stratum treat treatxsscore{p_end}
{hline 84}

{com}.                         /* big negative interaction, but very imprecise */
.                                                 
.                         test tchrtreat_s tchrtreatxsscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreat_s = 0{p_end}
{p 0 7}{space 1}{text:( 2)}{space 1} tchrtreatxsscore = 0{p_end}

{txt}       F(  2,   130) ={res}    0.44
{txt}{col 13}Prob > F ={res}    0.6467
{txt}
{com}.                         test tchrtreatxsscore

{txt}Adjusted Wald test

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreatxsscore = 0{p_end}

{txt}       F(  1,   131) ={res}    0.53
{txt}{col 13}Prob > F ={res}    0.4674
{txt}
{com}.                         lincom tchrtreat_s + tchrtreatxsscore  /* impact for schools with avg msci teacher score 1 std deviation above the control mean */

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreat_s + tchrtreatxsscore = 0{p_end}

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}stdIRTsci~10{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}(1) {c |}{col 14}{res}{space 2}-.2012223{col 26}{space 2} .2175673{col 37}{space 1}   -0.92{col 46}{space 3}0.357{col 54}{space 4}-.6316223{col 67}{space 3} .2291776
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         lincom tchrtreat_s - tchrtreatxsscore

{p 0 7}{space 1}{text:( 1)}{space 1} {res}tchrtreat_s - tchrtreatxsscore = 0{p_end}

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}stdIRTsci~10{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}(1) {c |}{col 14}{res}{space 2} .0896288{col 26}{space 2} .3041529{col 37}{space 1}    0.29{col 46}{space 3}0.769{col 54}{space 4}-.5120582{col 67}{space 3} .6913158
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}.                         
.                         
. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\jschaf01\Box\Nepal\Journalarticle\SecondSubmission\NepalTeacherTrainingPBR_journalarticle\Logs\teachersubjectknowledge.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}23 Feb 2022, 13:05:53
{txt}{.-}
{smcl}
{txt}{sf}{ul off}